JuMaPro
Zur Navigation springen
Zur Suche springen
Code schön fein säuberlich im Wiki abgelegt
int punkt; void setup() { pinMode(2, OUTPUT); // KATHODE 1 pinMode(3, OUTPUT); // KATHODE 2 pinMode(4, OUTPUT); // KATHODE 3 pinMode(5, OUTPUT); // ANODE 1 pinMode(6, OUTPUT); // ANODE 2 pinMode(7, OUTPUT); // ANODE 3 } void loop(){ for(punkt=0;punkt<=50;punkt++){ a();delay(1);aus(); e();delay(1);aus(); i();delay(1);aus(); } for(punkt=0;punkt<=50;punkt++){ d();delay(1);aus(); e();delay(1);aus(); f();delay(1);aus(); } for(punkt=0;punkt<=50;punkt++){ g();delay(1);aus(); e();delay(1);aus(); c();delay(1);aus(); } for(punkt=0;punkt<=50;punkt++){ b();delay(1);aus(); e();delay(1);aus(); h();delay(1);aus(); } } void aus(){ digitalWrite(2, HIGH); digitalWrite(3, HIGH); digitalWrite(4, HIGH); digitalWrite(5, LOW); digitalWrite(6, LOW); digitalWrite(7, LOW); } void a(){ digitalWrite(2, LOW); digitalWrite(5, HIGH); } void b(){ digitalWrite(2, LOW); digitalWrite(6, HIGH); } void c(){ digitalWrite(2, LOW); digitalWrite(7, HIGH); } void d(){ digitalWrite(3, LOW); digitalWrite(5, HIGH); } void e(){ digitalWrite(3, LOW); digitalWrite(6, HIGH); } void f(){ digitalWrite(3, LOW); digitalWrite(7, HIGH); } void g(){ digitalWrite(4, LOW); digitalWrite(5, HIGH); } void h(){ digitalWrite(4, LOW); digitalWrite(6, HIGH); } void i(){ digitalWrite(4, LOW); digitalWrite(7, HIGH); }