Hi everyone and thank you for taking interest in my exciting project !
TL;DR
- I want to build a game with targets to shoot with my airsoft replicas.
- I want to have several modes in it, with custom lights for each targets
- I need advice on hit detection
- I need advice on code structure to manage it all
With the help of the community, I learned a lot and got started. As of 16th august 2025, I’ve developed 2 games + game selection, and am preparing for hardware implementation.
You will find the whole project followup page here, with many references & summaries inside to help you if you have a similar project / questions.
Original post
Context
I have a little experience with arduino/esp32 projects (sensors, radio, oled mainly) and have been initiated to airsoft recently (pistol toys propelling plastic balls). My friend and I quickly realised that aiming precisely and switching target were key skills to train, and that we could easily improve and have fun at the same time in my garage with a bit of tin cans, duct tape and a bit of electronics.
So my project is to build a target system with different games that help us improve and enjoy the process. Since this is my biggest project so far, and that I have not yet gone all the way on the technical aspects I anticipate, I'm seeking for advices.
Goal of the project and points of interrogation
1. Targets and shots
- So the targets consist in my baby powder milk cans covered with a cardboard piece, fixed on the wall, each backlit with WS2812B led ring (more on that later). The main idea is to light up the target when it is active, detect a shot and turn of the backlight.
- It occured that detection might be best through vibration since the airsoft replicas are quite powerful and the cans can be practically isolated from the wall vibrations. I thought of a piezoelectric buzzer + 1MOhm resistor + diod rectifier for this, but have never used it, so I don't know if this is a relevant choice
Any thoughts on that ?
2. Controlling several cans separately
- The second constraint is to multitask all of this, because several cans could be activated at the same time or not. I plan on using an ESP32 for memory issue, potentiality and availability.
- Multitasking through timers has been a pain in the *ss so far, and I have recently discovered that FreeRTOS could be a huge relief in managing this.
My question is : is this the right direction, or I'm missing/not anticipating something big ?
3. Many colors and 8 cans
- WS2812B seems the right technology
- because of color choice (for instance a versus game gives a color for each player, at the end of a countdown whoever shot the most target wins),
- but also the possibility to form a clock-like countdown (for instance a time challenge might leave less and less time to shot each target, visualizing the remaining time to shot the target by how many leds of the ring remain lit)
Since I will probably be using 24-led rings on 8 different cans, I know I must be using an additional power supply. But since there are so many cans, and maybe in the future I might want to differentiate the size of cans (with less leds on their respective rings), I am unsure weather it would be more appropriate to
- adress each can separately or serialize them
- have only one microcontroller to rule them all (but how do I expand my I/O ? are expansion board compatible with FreeRTOS ?)
- or have a slave microcontroller for each can (which will make the price of the project big, not optimize resources and I fear increase a lot complexity as I have never worked with BLE/Wifi and doubt it could show very low latency (which is required for UX purpose))
If you have advices I take them !
5. Game choice
- You undestood it : I plan on programming several games : solo or versus or team, quickest time to 20 hits or max hit in 30s, color challenge etc. But so far I have close to no idea on how to make people choose and reset their choice.
- The first idea was to use an incremental coder to select a game and a button to reset it (not very evolutive)
- The second idea was to publish a website on the local network and go through it (never done it)
- And another constraint is that sometime I'd like to light up my garage only using the targets, but to use this mode using a light switch in the garage, not having to go through wifi connection, web browsing etc.
Any return on experience and advice is also welcome here !
6. Game results
- Lastly, arcade style, I would like to show directly the result of the game (chrono, number of hit target etc.) to the players. I think the result for each player should be displayable on 2 digits per player (or 00-99 + 2 decimals on solo mode), which led me to think about 7 segments digits
- Problem is : big digits (5+ cm) are not very available on websites, and the one I find seem expensive with only red available.
My question is : for such a display,
- are there any other technology (or more specific technology) that might do well the job ?
- are there providers I should know that would allow a good value for money and choice of colors ?
I know that might seem a lot, but I'm very very excited about it and not afraid to learn / try / fail / improve as I did learning arduino DIY so far, and I'd love to share a video at the end ! Also, this will probably represent some money buying the components and I'm sure you understand why I'd like to prepare and do the right technical choices beforehands.
Thanks in advance for you help, I'm looking forward to reading you !
Albert
Edit to centralize some resources :
- On state machines
- On WS2812B and FastLED
- On hit detection
- More on the follow-up page : resources for learners & memos


