ach, bin Anfänger und ich übe einfach zu wenig ...
daher hänge ich an folgendem, heruntergebrochenem Easy-Sketch, der nicht die LEDs ändern will.
Es ist ein Digispark Attiny85.
Warum mag der nicht?
Code:const int M1=4; //Noise Modul 1 auf 4 const int M2=5; // Noise Modul 2 auf 5 const int buzz=0; // Buzzer auf 0 const int green =1; //LED Grün auf 1 const int yellow =2; //LED Gelb auf 2 const int red=3; //LED Rot auf 3 void setup() { pinMode(buzz, OUTPUT); //Buzzer pinMode(green, OUTPUT); // Green LED pinMode(yellow, OUTPUT); //Yellow LED pinMode(red, OUTPUT); // red LED pinMode(M1, INPUT); //Noise Modul1 pinMode(M2, INPUT); //Noise Modul2 } // the loop routine runs over and over again forever: void loop() { int schwelle1= digitalRead(M1); int schwelle2= digitalRead(M2); if (schwelle1=0){ digitalWrite(green, HIGH); } if (schwelle1=1) { digitalWrite(green, LOW); } }







Zitieren

Lesezeichen