Turn on a light?
A doorbell?
Or get people moving?
There are many types of buttons, but my favorite is arcade buttons because they usually have a great feel, that “click” sensation.
I have a few arcade buttons in my toolbox, and I’ve always wanted to do something with them.
One day, I had a bright idea to DIY a sports device using buttons.
I will make 4 sports buttons, one as the main node, with a screen that supports menu display, and the other three as slave nodes, communicating via the ESP-NOW protocol.
They are all based on the ESP32-C3, a microcontroller from DFRobot.

Materials List
-
ESP32-C3 x4 -
Gravity: I2C OLED-2864 Display -
Gravity: Digital Buzzer Module (Arduino compatible) x4 -
3.7V Battery x4 -
WS2812 LED x4 -
Arcade Buttons x4 -
Power Switch x4 -
Enclosure x4
Circuit Connection

-
The buzzer connects to pin (6) -
The button wiring connects to pin (5) -
The ws2812 connects to pin (0) -
The screen connects to the I2C interface
This application has 4 nodes, including 1 main node and 3 slave nodes, with the main node having an additional display screen.
Hardware Assembly

Solder the WS2812 LEDs (solder in the order of GND, VCC, signal):

Solder the 3.7V rechargeable lithium battery:


Quickly connect via Gravity interface: Display/Buzzer—ESP32-C3:

Cut out Type-C/display/switch/button cutouts on the plastic enclosure:


Install arcade buttons:

Install the power switch:

Install the display:

Use hot melt glue to secure the battery/buzzer:

Secure the ESP32-C3:



Close the lid and screw it on:

At this point, the main node has been completed, and the above steps need to be repeated to complete the production of the other 3 slave nodes (the slave nodes do not include the display).

Upload Program
This application communicates between master and slave nodes via the ESP-NOW protocol. To communicate via NOW protocol, you need to obtain the unique MAC address of each ESP32-C3, so you know which device to send information to.

Modify the MAC address in the program to your own, and then upload:

Show Gameplay
Briefly talk about the game rules, in the program, I preset three modes, which can be selected by short pressing and confirmed by long pressing for 2 seconds.
When you need to switch, you can always long press to enter the menu.

Mode 1 – Whac-A-Mole Mode
In this mode, a red button will randomly appear on 4 sports buttons, and you need to press it in the shortest time to score.
Mode 2 – Relay Mode
In this mode, every time you press a green button on a sports button, the next sports button will turn green.
Mode 3 – Random Mode
In this mode, when we press the sports button, it will randomly select a sports button. If you don’t know who to choose, let the machine decide for you.
There is also a single node height challenge:
ESP-NOW Delay Test:
To confirm that the NOW protocol can meet communication requirements, a basic ESP-NOW communication delay test was conducted, recording the time it took for a node to send information to another node and receive a return response. The transmission and reception delay is about 4ms, and the one-way propagation delay is about 2ms, which is equivalent to 1/100 seconds.

I guess at this moment you must be sitting, staring at the display screen! After a long time of sitting, how’s your back? Get up and move around, relax a bit!
Portal:<span>https://github.com/DFRobot/SportsButtonESP32C3</span>
Hardware Armory
DF Hardware Armory
Click to learn more👆
If anyone has something to say, feel free toleave a message!
Click the bottom left cornerRead the original text, directly communicate with the author!
Previous Project Review
What can be done with old PCBs?
Create an interactive LED wall with Arduino
Create a weather clock with TFT touchscreen + ESP8266
DIY an Apple-style ESP32-S3 smartwatch
Raspberry Pi Cyberdeck with 6 screens, check it out!
Interesting, 433MHz self-powered wireless controller
Create a system monitoring screen based on ESP32, supporting Bluetooth connection with PC
Equipped with a 7.62mm machine gun! Check out the debut of our combat robot dog!
Foreign scientists invent laser cannon to kill cockroaches! AI automatic identification, project open source!
Click to read👆