Arduino programming:- Void setup and loop

Опубликовано: 24 Июль 2026
на канале: Dr. Anil Kumar Kamboj Official
307
9

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);
}