My "setup" and "loop" from "void loop()" and "voidsetup()" aren't bold...
they used to always be whenever i typed them into the ide.
Also now there is an error message saying
"ledOn' was not declared in this scope"
int switchPin = 8;
int ledPin = 13;
boolean lastButton = LOW;
boolean ledOn = false;
void setup()
{
pinMode(switchPin, INPUT);
pinMode(ledPin, OUTPUT);
}
void loop()
{
if(digitalRead(switchPin) == HIGH && lastButton == LOW)
{
ledON = !ledON;
lastButton = HIGH;
}
else
{
lastButton = digitalRead(switchPin);
}
digitalWrite(ledPin,ledON);
}