Instead of PWM, basic digital output is used to control the RGB LED in the
bootLogo() and flashlight() functions. This reduces code size for sketches
which don't use the setRGBled() function. In bootLogo(), instead of dimming
the red LED, the red then green then blue LEDs are lit in sequence at full
brightness.
digitalWriteRGB() was added as a public function and is also used for the
changes above.
Checks if the "B" button is being held down when begin() is called.
If so, waits for other buttons to be pressed to control system functions.
Functions implemented:
"UP" button: Set "sound enabled" in EEPROM.
"DOWN" button: Set "sound disabled" (mute) in EEPROM.
Based on Arduboy library V1.2 development as of April 2, 2016
- Class Arduboy2 replaces class Arduboy.
- Removed files ab_printer.h and ab_printer.cpp. Integrated their
functionality into class Arduboy2 (as with Arduboy V1.1).
- Added new text functions:
- getCursorX(), getCursorY() to get the current cursor position.
- setTextColor(), setTextBackground() to allow inverted text
(black on white).
- clear() is overridden to set the cursor to 0, 0 in addition to clearing
the screen buffer.
- New Class: Arduboy2Base which contains most of the Arduboy functions and
is inherited by Arduboy2. It doesn't inherit Print, and doesn't include
text display and cursor control functions. Using it instead of Arduboy2,
in sketches that don't use text functions, frees up some code space.
- Function drawChar() is in Arduboy2 instead of Arduboy2Base.
- Made setRGBled() static. Not making it static was an oversight.
("Tunes" functions are still moved to the separate ArduboyPlaytune library,
as they were in Arduboy V1.2)