Arduino Programming

Blink an LED with certain delay.

int pinNo=13;
int on=1000;
int off=500;

void setup()
{
pinMode(pinNo,OUTPUT);
}

void loop()
{
digitalWrite(pinNo, HIGH);
delay(on);
digitalWrite(pinNo, LOW);
delay(off);
}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License