This library is no longer being maintained.
It is recommended that new development use the Arduboy2 Library.
Welcome to Arduboy! This README
will provide an
introduction to the Arduboy platform and the Arduboy Library.
The Arduboy community can be found at http://community.arduboy.com/.
Arduboy is an open-source hardware platform allowing gamers to easily make and share games using C/C++. The Arduboy Library is an open-source library that provides a programming interface for making games and applications that run on an Arduboy. The Arduboy Library supports both the production and development Arduboy units.
The Arduboy Library is on Github at https://github.com/Arduboy/Arduboy.
The Arduboy project is free and open-source, and is developed by the community
using git
and
Github.
To start using the Arduboy Library in your applications, the library must be available to your own project's source. The most reliable method for including the latest stable release of the Aruboy Library in your project is to use the Arduino IDE and its Library Manager.
After the Arduboy Library is installed, it must be included for use in your project's source.
The Arduboy Library can be installed on your system in manys: through the Arduino
IDE, using git
to clone the library, or manually download and install the
library. This section outlines the most common methods, and the Arduboy Library
must only be installed once. Please use the first method
Install Using the Arduino IDE if you are unsure.
Using the Arudino IDE, under the menu item, Sketch > Include Library
, can be
found Manage Libraries...
. This will open the Arudino IDE's Library Manager.
Using this dialog the Arduboy Library can be searched for and installed. After
the Arduboy Library has been installed by the Arduino IDE, the library is
available to all of your projects and can be included by adding,
#include <Arduboy.h>
, to beginning of your project's main source file.
See the section Include the Arduboy Library below for instructions on including the Arduboy Library in your own projects.
Install the library by cloning the Arduboy repository.
$ git clone https://github.com/Arduboy/Arduboy.git
The Arduboy Library can also be installed by downloading and unpacking a
release package into your
system's Arduino libraries
folder.
The library should be installed into your user's home Arduino libraries
directory. Refer to the following list for the location of the Arduino
libraries
folder.
Arduino library locations listed by operating system (OS).
Linux
/home/username/Documents/Arduino/libraries
Mac
/Users/username/Documents/Arduino/libraries
Windows
C:\Users\username\My Documents\Arduino\libraries
If you don't find the libraries
folder in one of the above locations, you can
determine its location using the navigation menu File > Preferences
. In the
Settings
tab will be a Sketchbook location:
field. The libraries
folder
will be in the folder set in this field.
To start using the Arduboy library in your own sketches, the Arduboy.h
header
must be included in your project. To do so, add the following line to the
top of your project's .ino
file, or your main source file.
#include "Arduboy.h"
You can have the Arduino IDE add #include "Arduboy.h"
to your sketch
automatically by using the navigation menu Sketch > Include Library > Arduboy
.
The recommended way to upload to an Arduboy is by using the Arudino IDE.
Select the Leonardo board as the target platform, or use the following instructions to add the Arduboy and Arduboy Devkit to the Arduino IDE.
In the Arudino IDE select, File > Preferences
. In the Settings tab there
will be a field titled Additional Boards Manager URLs:, put the following in
this field:
https://arduboy.github.io/board-support/package_arduboy_index.json
See this guide for more detailed instructions.
Example games and source can be found in the examples
directory.
Find and play an example by opening it through the Arduino IDE, compiling, and uploading the example to the Arduboy.
Examples can be found in the Arduino IDE in the navigation menu under,
File > Examples > Arduboy > Example_Name
.
To run this library on a development Arduboy board, edit src/core/core.h
so
that #define AB_DEVKIT
is uncommented and #define ARDUBOY_10
is comment out.
//#define ARDUBOY_10 //< compile for the production Arduboy v1.0
#define AB_DEVKIT //< compile for the official dev kit
If you find that a modified version of the Arduboy Library has been used to build a game, and you have already installed a release version of the Aruboy Library, then several options are available to allow you to compile and run the application without altering the Arduino IDE's libraries.
Use one of the following options to compile sketches that have included copies of the Aruboy Library,
Option 1
Remove the local Arduboy.cpp
and Arduboy.h
files and try recompiling.
This will only work in some cases.
Option 2
Rename Arduboy.h
to CustomArduboy.h
(or a similar name) and add
#include "CustomArduboy.h"
to the .ino
sketch file.