My first Arduino programming code is below
int led =13; //initialisation for led pin 13.
void setup() // the setup function runs once when you press reset or power the board.
{
pinMode(led,OUTPUT);
} // initialize digital pin LED_BUILTIN as an output.
void loop() // the loop function runs over and over again forever.
{
digitalWrite(led,HIGH); // turn the LED on (HIGH is the voltage level) .
delay(1000); // wait for a second.
digitalWrite(led,LOW); // turn the LED off by making the voltage LOW.
delay(1000); //wait for a second.
}
int led =13; //initialisation for led pin 13.
void setup() // the setup function runs once when you press reset or power the board.
{
pinMode(led,OUTPUT);
} // initialize digital pin LED_BUILTIN as an output.
void loop() // the loop function runs over and over again forever.
{
digitalWrite(led,HIGH); // turn the LED on (HIGH is the voltage level) .
delay(1000); // wait for a second.
digitalWrite(led,LOW); // turn the LED off by making the voltage LOW.
delay(1000); //wait for a second.
}
Hello
ReplyDeleteNice job bro
ReplyDelete