Introduction: LED Binary Counter

About: I am a student at American High School. I love math, programming, and building circuits!

This circuit counts from 1 to 15 in binary using LED lights.

Supplies

  1. Elegoo Uno R3 Microcontroller Board
  2. Breadboard
  3. Computer
  4. 4 x 330 ohm resistors
  5. 4 x LED lights
  6. USB cable

Step 1: Attach the Resistors and LEDs

Connect as shown. The bottom of the resistor should connect to the long end of the LEDs.

Step 2: Connect the Resistors to the Input Pins

Connect the top of each resistor to 4 different input pins on the microcontroller board.

Step 3: Connnect the Circuit to Ground

Connect the short end of the LEDs to ground (GND).

Step 4: Write the Program

First you will have to install Arduino IDE on your device.

Here is the code to write the binary counter:

https://github.com/tejbho/ArduinoProjects/blob/main/Binary/Binary.ino

You may have to change the values for redPin, greenPin, bluePin, and yellowPin, to match the pins you attached to on the microcontroller board.

Step 5: Test the Circuit

The output of the LEDs should match the chart above, where the red LED represents the first digit, and the yellow LED represents the fourth digit.