LED Binary Counter

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

- Elegoo Uno R3 Microcontroller Board
- Breadboard
- Computer
- 4 x 330 ohm resistors
- 4 x LED lights
- USB cable
Attach the Resistors and LEDs

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

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

Connect the short end of the LEDs to ground (GND).
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.
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.