Arduboy2 Library
Arduboy2.h File Reference

The Arduboy2Base and Arduboy2 classes and support objects and definitions. More...

#include <Arduino.h>
#include <EEPROM.h>
#include "Arduboy2Core.h"
#include "Arduboy2Beep.h"
#include "Sprites.h"
#include "SpritesB.h"
#include <Print.h>
#include "Arduboy2Audio.h"
+ Include dependency graph for Arduboy2.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Rect
 A rectangle object for collision functions. More...
 
struct  Point
 An object to define a single point for collision functions. More...
 
class  Arduboy2Base
 The main functions provided for writing sketches for the Arduboy, minus text output. More...
 
class  Arduboy2
 The main functions provided for writing sketches for the Arduboy, including text output. More...
 

Macros

#define ARDUBOY_LIB_VER   50200
 Library version. More...
 
#define ARDUBOY_UNIT_NAME_LEN   6
 
#define EEPROM_STORAGE_SPACE_START   16
 Start of EEPROM storage space for sketches. More...
 
#define BLACK   0
 
#define WHITE   1
 
#define INVERT   2
 Color value to indicate pixels are to be inverted. More...
 
#define CLEAR_BUFFER   true
 

Detailed Description

The Arduboy2Base and Arduboy2 classes and support objects and definitions.

Definition in file Arduboy2.h.

Macro Definition Documentation

#define ARDUBOY_LIB_VER   50200

Library version.

For a version number in the form of x.y.z the value of the define will be ((x * 10000) + (y * 100) + (z)) as a decimal number. So, it will read as xxxyyzz, with no leading zeros on x.

A user program can test this value to conditionally compile based on the library version. For example:

// If the library is version 2.1.0 or higher
#if ARDUBOY_LIB_VER >= 20100
// ... code that make use of a new feature added to V2.1.0
#endif

Definition at line 36 of file Arduboy2.h.

#define ARDUBOY_UNIT_NAME_LEN   6

The maximum length of the unit name string.

Definition at line 39 of file Arduboy2.h.

#define BLACK   0

Color value for an unlit pixel for draw functions.

Definition at line 75 of file Arduboy2.h.

#define CLEAR_BUFFER   true

Value to be passed to display() to clear the screen buffer.

Definition at line 88 of file Arduboy2.h.

#define EEPROM_STORAGE_SPACE_START   16

Start of EEPROM storage space for sketches.

An area at the start of EEPROM is reserved for system use. This define specifies the first EEPROM location past the system area. Sketches can use locations from here to the end of EEPROM space.

Definition at line 65 of file Arduboy2.h.

#define INVERT   2

Color value to indicate pixels are to be inverted.

BLACK pixels will become WHITE and WHITE will become BLACK.

Note
Only function Arduboy2Base::drawBitmap() currently supports this value.

Definition at line 86 of file Arduboy2.h.

#define WHITE   1

Color value for a lit pixel for draw functions.

Definition at line 76 of file Arduboy2.h.