Introduction: Neo Pixel, Fastest Thumb Game.
I built this project because to take to my local Makerfaire In Newcastle, UK. The idea was to make a school yard game that would be relatively cheap and simple to produce.
The idea is simple, to win you have to press the button repeatedly until you fill the pixel ring with light. You compete directly with an opponent and the winner gets a green flashing ring, whilst the loser gets a red flashing ring.
To make the project, I used SolidWorks design, 3D printing and I designed the circuit boards using Fritzing. I had the circuit boards milled My University.
In all I think the project turned out well. The video shows game play; simple but effective.
Step 1: Parts Required
I had some of this stuff lying around but it shouldn't cost too much to build the whole thing. I used an ethernet data cable for the handsets because it had plenty of cores to wire the handsets and buttons.
Solder headers female and male
Adafruit Trinket - Mini Microcontroller - 5V Logic
3 x AAA Battery Holder with On/Off Switch and 2-Pin JST
2 x 10K resistors
an old Ethernet network cable
JST-PH 2-Pin SMT Right Angle Connector
Step 2: The Circuit Board
The first iteration was obviously built on a bread board but once I had done that, I designed the circuit board using Fritzing. I did the whole thing in the circuit board view because I wanted to use headers, rather than components on the breadboard, to plug things in. This way also allowed me to use screw terminals for the handsets.
I have uploaded the .fzz file, I am not sure how much use the schematic is ,but you can easily use the file to get the board milled or etched.
The board view shows the underside of a single sided board. I have labelled the screw terminals with the relevant wires form the handsets.
Step 3: The Handsets
The SolidWorks file and the STL file for the handsets are included.
I used a Makerbot to print them and they were oriented standing straight up as (i.e the way you hold them). I forgot to allow holes for the wires of the Neo-pixel rings so I had to drill them.
I marked the positions of the holes with a marker pen and I used a hand drill to drill the holes.
Step 4: Wiring the Handsets
This was a bit tricky, but after tinning the wires, I found that by inserting the data cable first and using a small screwdriver to tease the wires into the right position I was able to pass the wires through the drilled wholes and the button hole.
The wire colors for my data cable were wired like this
Brown - NeoPixel In
Brown and White -NeoPixel Out
Green - Neopixel Power
Green and White- Ground
Blue - Button Ground
Blue and white- Button Signal
I wired the these two to the same button terminal
Orange Button 5V
Step 5: Soldering the Circuit Board
I did the building in a few stages:
1) I soldered the battery connector to the Trinket.
This is surface mount soldering so a little tricky but found the a bulldog clip was useful to hold the connector in place for soldering.
2) I soldered in the jumpers and the resistors.
There are three in the circuit and I realized later that two are not required. Also I had originally intended to use a reset button, but found that the battery pack on off switch as a reset was better and easier to program. (maybe version 2 will be better)
3) then I soldered the screw terminal in place.
4) finally I soldered in the trinket
Step 6: Screwing It All Together.
Once I had done that, I Screwed the wires for each hand set into the board. I put the board in a small box with grommets to hold the cables in place.
Step 7: The Code
The code is included, ( I have commented it to make it more understandable) but if you feel brave enough to mess around and maybe make the game more or less difficult the following resources are very useful.
To set up the trinket in my Arduino IDE, I followed the Adafruit, Introducing Trinket Guide, for the reading the button change, I just adapted the example in the Arduino IDE. For all the NeoPixel stuff, a good reference is the Adafruit NeoPixel Überguide.
The only coding issue that I got stuck on was that, because I was using an RGB and White (RGBW) NeoPixel, I had to change this line:
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_RGBW + NEO_KHZ800);
Step 8: Future Iterations
This project turned out pretty well, but improvements I can think of are:
- Make it wireless (Wemos or Huzzahs might work for this). Maybe even an IOT version you can play with people over Skype for instance.
- Add difficulty controls i.e a potentiometer to change the number of presses to fill the ring.
- Obviously shrink it a bit.
- Anything else you guys can think of. If you have suggestions I would be happy to hear them.
Participated in the
Tip 5 years ago on Step 8
as you proceed to the next led, you can increase the amount of pressure you need to apply to make it switch on.. this will make the game a bit more effort consuming and more competitive. you can use a dps 310 digital pressure sensor since they are small and can easily be coded and attached to your already compatible setup
5 years ago
This is so many levels of cool I don't even know where to start haha. Nice work!!
Reply 5 years ago
Thanks, it is rather fun to play.
5 years ago