This is a triple LED counter circuit based on Arduino.
Description
Components:
Arduino UNO
HD44780 LCD Display
LED
220Ω Resistor
Jumper Wires
Connections:
LCD to Arduino:
RS (Register Select) pin connected to Arduino Digital Pin 12.
E (Enable) pin connected to Arduino Digital Pin 11.
D0-D3 (Data pins) connected to Arduino Digital Pins 5-2 respectively.
D4-D7 (Data pins) connected to Arduino Digital Pins 10-7 respectively.
LED:
Positive leg connected to Arduino Digital Pin 13.
Negative leg connected through the 220Ω resistor to the Arduino's Ground (GND).
Code Functionality
Initializes LCD, sets LED as output. Clears LCD, displays "Counting to 100...". Counts 1-100, displays count, blinks LED for multiples of three, counts blinks. After count, shows "LED Blinks: X" and halts.After count, shows "LED Blinks: X" and halts: Once the count reaches 100, the program stops incrementing and displays the total number of LED blinks on the LCD. The program then halts, and the final message remains on the display.
Comments
Please log in or sign up to comment.