Arduboy2 Library  6.0.0
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 "Arduboy2Audio.h"
#include "Arduboy2Beep.h"
#include "Sprites.h"
#include "SpritesB.h"
#include <Print.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   60000
 Library version. More...
 
#define ARDUBOY_UNIT_NAME_LEN   6
 The maximum number of characters in an unterminated unit name. More...
 
#define ARDUBOY_UNIT_NAME_BUFFER_SIZE   (ARDUBOY_UNIT_NAME_LEN + 1)
 The mininum number of characters required to store a null-terminated unit name. More...
 
#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

◆ ARDUBOY_LIB_VER

#define ARDUBOY_LIB_VER   60000

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 makes use of a new feature added to V2.1.0
#endif

Definition at line 38 of file Arduboy2.h.

◆ ARDUBOY_UNIT_NAME_BUFFER_SIZE

#define ARDUBOY_UNIT_NAME_BUFFER_SIZE   (ARDUBOY_UNIT_NAME_LEN + 1)

The mininum number of characters required to store a null-terminated unit name.

This value should be used to specify the size of a char array large enough to store a C-style null-terminated string holding a unit name.

See also
Arduboy2Base::readUnitName() Arduboy2Base::writeUnitName() ARDUBOY_UNIT_NAME_LEN

Definition at line 66 of file Arduboy2.h.

◆ ARDUBOY_UNIT_NAME_LEN

#define ARDUBOY_UNIT_NAME_LEN   6

The maximum number of characters in an unterminated unit name.

This value represents the maximum number of characters in a unit name NOT including the necessary null character required to store the unit name as a C-style null-terminated string. To specify the size of a char array large enough to store a null-terminated string holding a unit name, please use ARDUBOY_UNIT_NAME_BUFFER_SIZE instead.

See also
ARDUBOY_UNIT_NAME_BUFFER_SIZE

Definition at line 53 of file Arduboy2.h.

◆ BLACK

#define BLACK   0

Color value for an unlit pixel for draw functions.

Definition at line 79 of file Arduboy2.h.

◆ CLEAR_BUFFER

#define CLEAR_BUFFER   true

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

Definition at line 92 of file Arduboy2.h.

◆ EEPROM_STORAGE_SPACE_START

#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 76 of file Arduboy2.h.

◆ INVERT

#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 90 of file Arduboy2.h.

◆ WHITE

#define WHITE   1

Color value for a lit pixel for draw functions.

Definition at line 80 of file Arduboy2.h.