It didn’t take me and Robert long to find an RGB LED pushbutton. I composed a short part number using the NKK data sheet and found a KP0215ASBKG03RGB-2SJB. I made a simple perf board shield with the proper resistors for my Arduino Mega 1280 and re-learned Arduino to light it up.

Gaussian curves from https://www.desmos.com/calculator/zkmpvehya3
Gaussian curves from https://www.desmos.com/calculator/zkmpvehya3

When I wanted to smoothly fade between all the available RGB colors, I couldn’t find a good solution. So I made my own using Gaussian curves. Here is a picture and link to the online graphic calculator desmos that was very helpful visualizing the LED levels.
There is more:

I also used the online Arduino IDE Codebender.cc to program the Arduino from a few different computers. It all runs off a chrome or firefox extension. I have embedded the code below. You can upload it to you Arduino right from this window.

I eventually got the RGB LED fading really well as you can see in this Vine:

After this success, I came up for the idea of the game with Brendan. I then coded a simple color matching game. In void setup() it flashes some colors, displays some ASCII art over serial and picks and displays a color. If you don’t touch it, the program goes into Demo Mode and just rotates pretty colors. If you press the button, the colors slowly cycle. You let go when you think it matches the color you remember, and then judges your guess. The video below shows the whole process and some design:

This project was very interesting to do. Every decision was made as needed. I went from finding the component, getting it, building something, making it to display some fun, imagining a game around that fun, coding it, to enjoying the game in about a week of fixation. I wish you could all play with this simple device, but only the few that come to Hive76 open house on any Wednesday night will play it. Come play the 1 pixel video game!

Tagged with:
 

8 Responses to “1 Pixel video game; component-driven design”

  1. […] fantastic. It should since it costs over twenty bucks in single units. What they came up with is a one pixel video game that works like a color matching version of Simon Says. The button will show you the target color […]

  2. […] fantastic. It should since it costs over twenty bucks in single units. What they came up with is a one pixel video game that works like a color matching version of Simon Says. The button will show you the target color […]

  3. […] fantastic. It should since it costs over twenty bucks in single units. What they came up with is a one pixel video game that works like a color matching version of Simon Says. The button will show you the target color […]

  4. […] fantastic. It should since it costs over twenty bucks in single units. What they came up with is a one pixel video game that works like a color matching version of Simon Says. The button will show you the target color […]

  5. Ty Tower says:

    Bout time you changed away from this cumbersome captcha crap

  6. Sean McBeth says:

    That’s pretty cool. It’s a lot of fun when a project comes together like this. Did you build a case for it? I highly recommend book-shaped boxes :)

  7. eagleapex says:

    No case yet. I’d like to program the trippy RGB kit to play the game.

  8. astrodan says:

    Awesome! Interactive games like this are the best. The simpler they are the more mesmerizing they are! Would be cool if you added some sound too.

Leave a Reply

Hive76.org members: it's easier to log in.