Arduino led pendulum

Summary of Arduino led pendulum


This article guides setting up an Arduino LED pendulum circuit. It covers wiring the LEDs to Arduino digital pins and connecting the ground to a breadboard. The LED negative legs are attached to the breadboard's common ground, while the positives connect to respective pins. The Arduino sketch initializes the pins as outputs to control the LEDs. Components include an Arduino Uno, breadboard, wires, LEDs, and basic tools for wire preparation.

Parts used in the Arduino LED Pendulum:

  • Arduino board (Arduino Uno recommended)
  • Breadboard
  • 7 jumper wires (preferably different colors, >6 inches)
  • 6 LEDs (any color)
  • Wire stripper and cutter or pliers

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

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

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:
void setup() {
// initialize the digital pins as outputs.
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
pinMode(led5, OUTPUT);
pinMode(led6, OUTPUT);

}
Major Components in Project

Getting the parts

parts needed-
– An arduino board(arduino uno preferable for starters)-don’t worry if u have other and a to b cable
get it here(for Indians)- http://shop.sumeetinstruments.com/index.php?route=product/product&path=69_70&product_id=374

– A breadboard
– 7 pieces of wires(preferably differently coloured and more than 6 inches in length)- jumper/solid core preferable
– 6 leds (any color)

tools needed-
– wire stripper and cutter/or pliers (you don’t need them if you have a pair of strong jaws like me) 🙂

For more detail: Arduino led pendulum


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top