fix examples with now breaking API changes

This commit is contained in:
Josh Goebel 2016-02-28 02:14:53 -05:00 committed by Scott Allen
parent 8eb4deed69
commit c5445c7b9c
2 changed files with 9 additions and 7 deletions

View File

@ -16,9 +16,10 @@ version 2.1 of the License, or (at your option) any later version.
// Make an instance of arduboy used for many functions
Arduboy arduboy;
AbPrinter text(arduboy);
// Variables for your game go here.
char text[] = "Press Buttons!";
char title[] = "Press Buttons!";
byte x;
byte y;
@ -96,10 +97,10 @@ void loop() {
arduboy.clear();
// we set our cursor x pixels to the right and y down from the top
arduboy.setCursor(x, y);
text.setCursor(x, y);
// then we print to screen what is stored in our text variable we declared earlier
arduboy.print(text);
text.print(title);
// then we finaly we tell the arduboy to display what we just wrote to the display.
arduboy.display();

View File

@ -15,6 +15,7 @@ version 2.1 of the License, or (at your option) any later version.
// make an instance of arduboy used for many functions
Arduboy arduboy;
AbPrinter text(arduboy);
// This function runs once in your game.
@ -41,10 +42,10 @@ void loop() {
// we set our cursor 5 pixels to the right and 10 down from the top
// (positions start at 0, 0)
arduboy.setCursor(4, 9);
text.setCursor(4, 9);
// then we print to screen what is in the Quotation marks ""
arduboy.print(F("Hello, world!"));
text.print(F("Hello, world!"));
// then we finaly we tell the arduboy to display what we just wrote to the display
arduboy.display();