I was copying some code from the internet and when compiling it I kept getting "Stray '/302' in program" error.
Here is the code:
int switchState = 0;
void setup() {
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(2, INPUT);
}
void loop() {
switchState = digitalRead(2);
// this is a comment
if (switchState == LOW) {
//the button is not pressed
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
digitalWrite(5, LOW);
}
else {
digitalWrite(3, LOW);
digitalWrite(4 LOW);
digitalWrite(5, HIGH);
delay(125);
digitalWrite(4, HIGH)
digitalWrite(5, LOW);
delay(125);
}
}
rocket.ino (612 Bytes)