DIY Sports Device with ESP32-C3

【Click the above“Blue Text” to follow the DF Maker Community, let’s become tech enthusiasts together】

DIY Sports Device with ESP32-C3

What can you do with a button?

Turn on a light?

A doorbell?

Or get people moving?

DIY Sports Device with ESP32-C3

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.

DIY Sports Device with ESP32-C3

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

DIY Sports Device with ESP32-C3
  • 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

DIY Sports Device with ESP32-C3

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

DIY Sports Device with ESP32-C3

Solder the 3.7V rechargeable lithium battery:

DIY Sports Device with ESP32-C3
DIY Sports Device with ESP32-C3

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

DIY Sports Device with ESP32-C3

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

DIY Sports Device with ESP32-C3
DIY Sports Device with ESP32-C3

Install arcade buttons:

DIY Sports Device with ESP32-C3

Install the power switch:

DIY Sports Device with ESP32-C3

Install the display:

DIY Sports Device with ESP32-C3

Use hot melt glue to secure the battery/buzzer:

DIY Sports Device with ESP32-C3

Secure the ESP32-C3:

DIY Sports Device with ESP32-C3
DIY Sports Device with ESP32-C3
DIY Sports Device with ESP32-C3

Close the lid and screw it on:

DIY Sports Device with ESP32-C3

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).

DIY Sports Device with ESP32-C3

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.

DIY Sports Device with ESP32-C3

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

DIY Sports Device with ESP32-C3

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.

DIY Sports Device with ESP32-C3

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.

DIY Sports Device with ESP32-C3

DIY Sports Device with ESP32-C3

DIY Sports Device with ESP32-C3

DIY Sports Device with ESP32-C3

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.

DIY Sports Device with ESP32-C3

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:

DIY Sports Device with ESP32-C3

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.

DIY Sports Device with ESP32-C3

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👆

Leave a Comment

×