Arduino programming basics started with the discussion of void setup and void loop. Comments in Arduino IDE are also discussed. PinMode, delay, and DigitalWrite explained.
Program:- Blinking of LED on pin number 8 of Arduino Uno
const int kPinLed = 8;
void setup(){
pinMode(kPinLed, OUTPUT); }
int ledState = LOW;
void loop()
{
ledState = !ledState;
digitalWrite(kPinLed, ledState);
delay(1000);
}