DIY Digital Click Counter
IntroductionAt ComicCon events, there's always a need for quick fixes and repairs for costumes, props, and other items. To keep track of the number of repairs we've done, we built a repair counter using a microcontroller and an OLED display. This project not only displays the repair count in real-time but also logs each repair with its timestamp for later analysis.
Features- Real-time Display: The OLED display provides a live count of repairs, showing the current repair count, hourly count, and the current time.
- Interactive Button: A button press increments the repair count. A secondary button is available to decrement the count if needed.
- Firework Animation: Celebrate each repair with a firework animation displayed on the OLED screen.
- Data Logging: Each repair is logged with its timestamp in a CSV file.
- Data Visualization: A Python script visualizes the hourly repair count for each day using bar graphs.
- Microcontroller (e.g., Raspberry Pi Pico)
- OLED Display (128x32)
- DS1307 RTC Module
- Push Buttons
Affiliate links
- Pico: https://amzn.to/3OI72b8
- RTC: https://amzn.to/3P6l1ss
- OLED: https://amzn.to/3qwPkzn
- Buck Converter: https://amzn.to/45EvC3B
- 18650 Holder: https://amzn.to/3E6U9lS
- PCB: https://amzn.to/45e3Afi
- Button: https://amzn.to/44k6BcT
- MicroPython
- Python (for data visualization)
- Libraries:
machine
,ssd1306
,ds1307
,time
,urandom
,os
,utime
,pandas
,matplotlib
- Setup the Hardware: Connect the OLED display and DS1307 RTC module to the microcontroller. Attach the button to the specified GPIO pin.
- Upload the Script: Transfer the main script to the microcontroller.
- Run the Counter: Execute the script to start the counter. Press the button to increment the repair count.
To analyse the repair data:
- Install Python and the required libraries.
- Run the provided Python script to visualize the repair count data. The script reads the
button_presses.csv
file and displays bar graphs showing the hourly repair count for each day.
This project offers a fun and interactive way to track repairs at events like ComicCon. The real-time display, combined with data logging and visualization, provides valuable insights into repair trends and busy hours. The firework animation adds a touch of celebration for each repair, making the process even more enjoyable.
Comments
Please log in or sign up to comment.