Learning Arduino the fun way - Writing Games with Arduboy
My kids and I are always tinkering with gadgets and electronics. If you follow me on Instagram you'll notice our adventures as we've built a small Raspberry Pi powered arcade, explored retro-tech, built tiny robots, 3D printed a GameBoy (PiGrrl, in fact), and lots more.
While we've done a bunch of small projects with Arduinos, it's fair to say that there's a bit of a gap when one is getting started with Arduino. Arduinos aren't like Raspberry PIs. They don't typically have a screen or boot to a desktop. They are amazing, to be sure, but not everyone lights up when faced with a breadboard and a bunch of wires.
The Arduboy is a tiny, inexpensive hardware development platform based on Arduino. It's like a GameBoy that has an Arduino at its heart. It comes exactly as you see in the picture to the right. It uses a micro-USB cable (included) and has buttons, a very bright black and white OLED screen, and a speaker. Be aware, it's SMALL. Smaller than a GameBoy. This is a game that will fit in an 8 year old's pocket. It's definitely-fun sized and kid-sized. I could fit a half-dozen in my pocket.
The quick start for the Arduboy is quite clear. My 8 year old and I were able to get Hello World running in about 10 minutes. Just follow the guide and be sure to paste in the custom Board Manager URL to enable support in the IDE for "Arduboy."
The Arduboy is just like any other Arduino in that it shows up as a COM port on your Windows machine. You use the same free Arduino IDE to program it, and you utilize the very convenient Arduboy libraries to access sound, draw on the screen, and interact with the buttons.
To be clear, I have no relationship with the Arduboy folks, I just think it's a killer product. You can order an Arduboy for US$49 directly from their website. It's available in 5 colors and has these specs:
- Processor: ATmega32u4 (same as Arduino Leonardo & Micro)
- Memory: 32KB Flash, 2.5KB RAM, 1KB EEPROM
- Connectivity: USB 2.0 w/ built in HID profile
- Inputs: 6 momentary tactile buttons
- Outputs: 128x64 1Bit OLED, 2 Ch. Piezo Speaker & Blinky LED
- Battery: 180 mAh Thin-Film Lithium Polymer
- Programming: Arduino IDE, GCC & AVRDude
There's also a friendly little app called Arduboy Manager that connects to an online repository of nearly 50 games and quickly installs them. This proved easier for my 8 year old than downloading the source, compiling, and uploading each time he wanted to try a new game.
The best part about Arduboy is its growing community. There's dozens if not hundreds of people learning how to program and creating games. Even if you don't want to program one, the list of fun games is growing every day.
The games are all open source and you can read the code while you play them. As an example, there's a little game called CrazyKart and the author says it's their first game! The code is on GitHub. Just clone it (or download a zip file) and open the .ino file into your Arduino IDE.
Compile and upload the app while the Arduboy is connected to your computer. The Arduboy holds just one game at a time. Here's Krazy Kart as a gif:
Because the Arduboy is so constrained, it's a nice foray into game development for little ones - or any one. The screen is just 128x64 and most games use sprites consisting of 1 bit (just black or white). The Arduboy library is, of course, also open source and includes the primitives that most games will need, as well as lots of examples. You can draw bitmaps, swap frames, draw shapes, and draw characters.
We've found the Arduboy to be an ideal on ramp for the kids to make little games and learn basic programming. It's a bonus that they can easily take their games with them and share with their friends.
- Programming for Absolute Beginners
- Getting Started with Robots for kids and children in STEM this holiday season
- Teaching Children and Kids to Program the Old School Way
- Teaching Kids Electronics, Computers, and Programming Fundamentals with Snap Circuits
Sponsor: Thanks to Redgate this week! Discover the world’s most trusted SQL Server comparison tool. Enjoy a free trial of SQL Compare, the industry standard for comparing and deploying SQL Server schemas.