Da fehlt noch was!!
is HIGH:
if (buttonState1 == HIGH ; pushed =0);
)
// turn LED on:
digitalWrite(ledPin1, HIGH);
digitalWrite(ledPin0, LOW);
digitalWrite(ledPin2, LOW);
digitalWrite(ledPin3, LOW);
pushed =1;
}
else {
// turn LED off:
digitalWrite(ledPin1, LOW);
}
// read the state of the pushbutton value:
buttonState2 = digitalRead(buttonPin2);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState2 == HIGH) {
// turn LED on:
digitalWrite(ledPin2, HIGH);
}
else {
// turn LED off:
digitalWrite(ledPin2, LOW);
}
// read the state of the pushbutton value:
buttonState3 = digitalRead(buttonPin3);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState3 == HIGH) {
// turn LED on:
digitalWrite(ledPin3, HIGH);
else {
// turn LED off:
digitalWrite(ledPin3, LOW);
)
long randNumber; // deklariert eine variable
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 6 as an output.
randomSeed(analogRead(0));
pinMode(6, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
randNumber = random(1000,10000);
digitalWrite(7, HIGH); // turn the LED on (HIGH is the voltage level)
delay(randNumber); // wait for a second
digitalWrite(7, LOW); // turn the LED off by making the voltage LOW
}