MySensors-powered arcade game screen with wireless gamepad controller
OK, I realize that I am abusing the MySensors library a bit here
I have also built a wireless gamepad controller:
I wanted a barebone look, so I decided to build it directly on a 5x7cm prototype board. On the back is a 2xAA battery holder that is glued to the board. Raw and simple
The gamepad uses a nrf24l01+ and a 3.3V Arduino Pro Mini. When powered up, it presents 6 switches to the "gateway", using MySensors.
The "gateway" is a Wemos D1 Mini connected to the big screen seen below:
I merged the standard MySensors serial gateway sketch with a sketch for playing Tetris, and modified the game to read the status of the switches instead of using locally attached buttons.
I am using the development branch of MySensors since v2.0 doesn't call receive() on the gateway.
All kudos for the game should go to Aaron Liddiment, https://github.com/AaronLiddiment/LEDSprites - I did not write the game myself.
The wemos + screen draws less than 1 ampere, so a USB power pack can power it for hours. That means the game is portable and can be used anywhere. It would be fun to play it on the bus/train
Some thoughts for future development:
- Add signing and see if that has a negative impact on the gaming experience. I don't want anyone sending fake button presses!
- Figure out how to handle the screen flickering that happens sometimes. There is a very long thread about this on github: https://github.com/FastLED/FastLED/issues/306
- Add more games. Snake, Pong, Sokoban, Breakout - ideas are very welcome
- Build one more wireless controller for multiplayer games
- Add the ability to use the screen as mood light when not playing.
- Add the ability to show weather when not playing a game (temperature as text, yellow background when sunny, blue/gray "falling" background when raining, etc)
- Use fadecandy
- Spectrum analyzer
The "gateway" code is available on Github: https://github.com/mfalkvidd/MySensors-ArcadeGames
The gamepad controller: https://github.com/mfalkvidd/MySensorsGamePad
Damn.. impressive build!
Only one word can express this "IMPRESSIVE"!!
Well done indeed..
pow pow pow excellent, that's really cool work! thx for share
A friend developed a snake game for this screen:
Snake on ESP8266 with WS2812B RGB LED screen Arduino – 00:33
— Mikael Falkvidd
Update: I have updated the game code to include both Tetris and Snake. Press the the two extra buttons (the ones that would be called A+B on a classic 8-bit Nintendo controller) at the same time to switch between the games.
New update: The game code now includes mood light, natural light and fire simulation modes.
Mood light can cycle through all colors of the rainbow and set brightness. Cycle colors by pressing left or right on the game pad. Set brightness by pressing up or down.
Natural light can adjust brightness (up/down). Left/right cycles between following color temperature:
- Candle 1900 K
- Tungsten 2850 K
- Halogen 3200 K
- Direct Sunlight 6000 K
- Clear Blue Sky 20000 K
Fire simulation can adjust heat level (left decreases, right increases) and cooling factor (up makes the fire cool off slower, down makes i cool off faster). The fire code is based on Darren P Meyer's project at https://github.com/darrenpmeyer/Arduino-FireBoard/
r-nox last edited by
Great work. I'm going to build this for my back yard!