Basic LED Blinking with Arduino UNO
This is a basic programme of led blinking. A "Hello World!" programme of IoT.
void setup() {
pinMode(2, OUTPUT); //declare pin to perform action
}
void loop() {
digitalWrite(2, HIGH); //led ON
delay(1000); //delay of 1 second
digitalWrite(2, LOW);//led OFF
delay(1000);
}