Arduino led pendulum

Arduino led pendulum (1)

Step 2: Putting up the wires

Strip both ends of wires
-insert one end of each wire into sockets numbered
-Gnd(black wire in my case)-this will be the common ground connection
– 13  (green wire in my case)
– 12  (yellow wire in my case)
– ~11  (orange wire in my case)
– ~10  (red wire in my case)
– 9    (brown wire in my case)
– 8    (brown wire in my case)

Arduino led pendulum (1)

Step 3: Hooking up wires to the breadboard

– hook up the wire connected to gnd(black in my case) to the common vertical line on the the sides of the breadboard
– connect other wires to different horizontal lines at at-least 3 lines left in between(just for convenience)

Confused?-see image

Step 4: Hook up the LED

– Put up the shorter end(-ve) of each led to the common ground line on the vertical line
– put up the longer end(+ve) of each led to the respective coloured wire connected horizontal line

Arduino led pendulum circuit (1)

Step 5: Write, compile and run the sketch

open the arduino software
copy and paste the following sketch-

int led1 = 13;
int led2 = 12;
int led3 = 11;
int led4 = 10;
int led5 = 9;
int led6 = 8;

// the setup routine runs once when you press reset:

Read more: Arduino led pendulum

Leave a Comment

Your email address will not be published. Required fields are marked *