Git Product home page Git Product logo

sportsbuttonesp32c3's Introduction

DIY Sports Push Buttons - Based on ESP32-C3

image

Push buttons, also known as tactile switches, can be found everywhere from simple lamps, doorbells to large industrial machines. There are so many kinds of push buttons, but I like the arcade push buttons most because they usually have a great tactile, "clicky” feel. I had several arcade buttons in my toolbox, and I always want to make something with them. Lately, I've been working out. One day an idea comes to my mind, can I turn my arcade buttons into a device that helps me do sports? Sounds not bad. I decided to give it a try. I am going to make 4 sports push buttons, one as a master node with a screen that supports a menu display and the other three as salve nodes. They are all based on ESP32-C3, a micro Beetle controller from DFRobot. It integrates a battery charging management function, which allows us to connect a lithium battery to it as a mobile power supply for the project, or charge the battery from the controller's USB-C port when the battery is low. Also, to make them more interactive, I will add some sound and lighting to the push buttons.

This is what it looks like in the end. image

The relevant information is uploaded on our YouTube channel

HARDWARE LIST

  • 4x ESP32-C3
  • OLED Display
  • 4x Digital Buzzer
  • WS2812 RGB LED strip
  • 4x 3.7V battery
  • 4x Arcade Push Button
  • 4x Power switch
  • 4x Case

Connection

The master node comes with a screen while the slave nodes do not. All parts should be connected as the diagram below.

  • Buzzer -> Controller’s P6
  • Button -> Controller’s P5
  • WS2812 -> Controller’s P0
  • Screen->I2C image

Upload Program

Since the master node communicates with the slave nodes by ESP-NOW in this project, the only MAC address of each ESP32-C3 should be obtained so that the master knows which device the message is intended for. image

Revise the MAC address to yours and upload the program. image

Start to Play

In the program, I set three modes for the buttons. Short press to select mode, press and hold for 2 seconds to confirm or enter the selection menu. image

Mode 1- Whac-A-Mole

In this mode, all 4 buttons show green light at first, then one of them changes to red randomly, and we need to hit the red one within a certain time to score. They can be played in various ways.

image image image image

Mode 2- Relay Race Mode

In this mode, hit the first button, then the second will light up green. Just like a relay race, the green light acts like a baton, which will be transferred one by one among four members repeatedly. image

Mode 3- Random Picker Mode

When entering this mode, 4 buttons repeatedly show blue light in order, hit the main button(button with screen), and this time the button whose light turns on in blue will be the picked one.

Or you can only use one button to test how high you can jump.

image

ESP-NOW delay test:

In the project, the master communicates with the salves by ESP-NOW. To ensure that the NOW protocol meets the communication requirement, here I completed a simple ESP-NOW delay test to record the time one node transmits a message to another and receives a replay. It can be seen that the total delay for transmitting and receiving is about 4ms, which means only a 2ms delay for one-direction transmission, equaling to 1/100s.

image

Thank

Well, that's all for this project. There are so many possibilities for these sports push buttons. Come and try your sports buttons! Thanks for reading, feel free to leave your comments if you have any other good ideas!

sportsbuttonesp32c3's People

Contributors

yunwen1918 avatar ouki-wang avatar

Stargazers

刘鹏 avatar  avatar 泠纯 avatar ww avatar HakbumHong avatar Jan Klausmeyer avatar  avatar  avatar Rui Melo avatar  avatar Rockets_cn avatar

Watchers

James Cloos avatar adair avatar  avatar Rui Melo avatar  avatar  avatar 吴潇 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.