This Arduino-based project uses a TCRT5000 infrared sensor to count detected objects and displays relevant statistics on a 1.8" TFT screen using the Adafruit ST7735 library. An optional push button can be used to manually reset counters.
- Object Counting: Increments the counter when the sensor detects an object.
- TFT Display: Shows total count, objects per minute/hour, and elapsed time.
- Auto Reset: If the sensor is continuously triggered for a set time, the system resets.
- Manual Reset: A push button allows manual resetting.
- Arduino Nano
- TCRT5000 Infrared Sensor
- 1.8" TFT Display (ST7735)
- Push Button for manual reset (optional)
Component | Arduino Pin |
---|---|
TCRT5000 Sensor | D2 |
Push Button | D3 |
TFT Backlight | D4 |
TFT Reset | D7 |
TFT DC | D8 |
TFT CS | D9 |
TFT MOSI | D11 |
TFT SCLK | D13 |
Modify the following constants in the code to adjust behavior:
#define TFT_FRAME_RATE 500
#define TFT_BRIGHTNESS 128
#define TCRT500_RESET_THRESHOLD 2000
#define RESET_DELAY 2000
#define DEBOUNCE_TIME_SENSOR 400
#define DEBOUNCE_PUSH_BUTTON 500
3D model coming on MakerWorld.