ARDUINO, How to blink a LED without using delays in your sketch

This ARDUINO tutorial will show you how to use a 555 timer to blink led’s so you don’t have to use delays in your sketch.

 

Click on video below for full tutorial!………

 

 

arduino_555_schem

Parts List:

ARDUINO Board

LED

555 timer

capacitors

Resistors

Jumper Wires

Bread Board

THE Sketch I used in the tutorial:

#define photo (A1)
#define timer 11
#define b1 2
int photoVal;
int b1Val = 0;

void setup() {
pinMode (timer,OUTPUT);
pinMode (b1,INPUT);
}

void loop() {
b1Val = (digitalRead(b1));
if (b1Val == 1)
{
delay(10);
digitalWrite(timer,HIGH);
photoVal = (analogRead(photo));
while (photoVal>500)
{
photoVal = (analogRead(photo));
delay(1);
}
digitalWrite(timer,LOW);
}

}