Not sure what I'm doing wrong here-here's the code
//test run of skills 01
#define LED //12 changes LED to 12 in code
void setup()
{
pinMode(LED, OUTPUT)//sets the digital
} //pin as output
void loop()
{digitalWrite(LED, HIGH) //turns on LED
delay(500) //waits for .5 sec
digitalWrite(LED,LOW) //turns led off
delay(1000) //waits for one second
digitalWrite(LED,HIGH)
delay(1000)
digitalWrite(LED,LOW)
delay(500)
}
just trying to get a light to flash
thanks
You have to put a semi-colon at the end of each statement:
//test run of skills 01
#define LED //12 changes LED to 12 in code
void setup()
{
pinMode(LED, OUTPUT);//sets the digital
} //pin as output
void loop()
{
digitalWrite(LED, HIGH); //turns on LED
delay(500); //waits for .5 sec
digitalWrite(LED,LOW); //turns led off
delay(1000); //waits for one second
digitalWrite(LED,HIGH);
delay(1000);
digitalWrite(LED,LOW);
delay(500);
}
Pete
el_supremo:
You have to put a semi-colon at the end of each statement://test run of skills 01
#define LED //12 changes LED to 12 in code
void setup()
{
pinMode(LED, OUTPUT);//sets the digital
} //pin as output
void loop()
{
digitalWrite(LED, HIGH); //turns on LED
delay(500); //waits for .5 sec
digitalWrite(LED,LOW); //turns led off
delay(1000); //waits for one second
digitalWrite(LED,HIGH);
delay(1000);
digitalWrite(LED,LOW);
delay(500);
}
Pete
tried that, still get the same error, and it highlights pinMode(LED, OUTPUT);//sets the digital
This#define LED //12 changes LED to 12 in code
should be this#define LED 12 //changes LED to 12 in code
Pete
thanks, that got it working