Ok so I am just starting up with this whole thing and I figured that randomizing the delay on a blinking LED would be fairly simple but I keep getting an error message that reads
"/tmp/768476775/sketch_jul6a/sketch_jul6a.ino:14:9: error: expected ';' before 'break'
delay break; // wait for a second
^~~~~
exit status 1"
Ii says that there is a ";" in front of the variable where it shouldn't be but I couldn't figure it ut after twiddling with it for a while so I figured I'd ask here.
Code:
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
int break = long random(0,1000);
}
// the loop function runs over and over again forever
void loop() {
int break = long random(0,10000);
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay break; // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay break; // wait for a second
}
Hope I'm not missing anything too obvious, Thanks in advance.