mirror of https://github.com/MLXXXp/Arduboy2.git
fix examples with now breaking API changes
This commit is contained in:
parent
8eb4deed69
commit
c5445c7b9c
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue