Hey! This series will walk you through everything you need to do in order to program a game for the Arduboy! It’ll be broken down into several parts, so I’ll be posting links whenever I finish writing them.
The Arduino IDE & Arduboy Library
So, in order to program a game for the Arduboy, you need to write your code in a program called the Arduino IDE . An IDE is an Integrated Development Environment. This means that it includes most of the tools you’ll need to program for your Arduboy. Arduino is the type of computer chip that the Arduboy is made from. All Arduino chips can be programmed the same way that we’re going to program your Arduboy, so you’ll actually learn how to program for several devices!
Downloading The IDE
Okay, to download the latest version of the Arduino IDE, you should follow this link .
Alternatively, you can directly download it here:
Installing The IDE
Install the Arduino IDE like you would any other program.
Installing The Arduboy Library
Not only do you need the Arduino IDE, but you’ll also need the latest Arduboy Library. You need that in order to tell your IDE how to interact with the Arduboy. To get it, go to Sketch > Include Library > Manage Libraries…
In the Manage Libraries window, search for ‘arduboy’. Multiple results will appear and you will see in the list an entry for ‘Arduboy’ and a second for ‘Arduboy2’. The original ‘Arduboy’ library has been superseded by the ‘Arduboy2’ library and is no longer being actively maintained. This tutorial will concentrate on the ‘Arduboy2’ library but you may need the earlier library to compile some older games from the site so I recommend you install them both
Install the latest ‘Arduboy’ library by highlighting it in the list. Select the most recent version, and hit Install .
Important!
We’ll also need to repeat the process for the latest ‘Arduboy2’ library. This is an updated library with more functionality built into it.
Installing The Board
Go to File > Preferences on Windows or Arduino > Preferences on macOS. In the Settings window, find the Additional Boards Manager URLs box.
Insert the following: https://arduboy.github.io/board-support/package_arduboy_index.json
, and click OK .
Next, go to Tools > Board > Board Manager . In the window that appears, search for “ Arduboy ”. The list should be narrowed down to the Arduboy board. Click it, then click the Install button.
Once it’s done installing, click the Close button.
Selecting The Board
In order to tell the IDE that you want to program for the Arduboy, you need to tell it that you’re actually going to work with the Arduboy, go to Tools > Board > Arduboy .
Please note that if you’re using a discontinued Arduboy model, you may want to check the Install Support For The Arduboy & DevKit section of this guide. Most people will not have to do this.
Selecting The Port
Turn on your Arduboy and connect it with a USB data cable. Then, go to Tools > Port , then select the Arduino Leonardo.
If you are running Windows, the port may be something like COM5 or whatever. If you’re on macOS or Linux, it may be something like /dev/cu.usbmodem1411 .
Loading An Example
Alrighty! You should be ready to test this out! Let’s load an example program that we got in the Arduboy Library. Go to File > Examples > Arduboy2 > HelloWorld . This will load a test application that prints out a single line of text to the Arduboy’s screen.
Uploading The Code
Whenever you’re ready to install the code, click the arrow key that looks like this:
This will do 3 tasks:
- Check your code for common problems or typos.
- Compile your code. This is when the IDE turns your programming language into computer language that the Arduboy can understand.
- Transfer your code your code to the Arduboy.
If the IDE sees any problems with your code or has an issue when compiling your game, it will alert you in the console window, which is the black area at the bottom. If you don’t run into any problems, then it will tell you how big your game is.
Look At Your Arduboy!
If you’ve followed these steps correctly, you should see your Arduboy displaying Hello World!
What’s Next?
Follow along through Part 2, which teaches you how to program your first Arduboy program!
Credits
I wrote this tutorial in order to give back to the programming community that taught me to get into it about 10 years ago. If you’d like to follow me on Twitter, please do so at http://www.twitter.com/crait . I’d greatly appreciate that.