This is an example "Hello World" program that works with the latest Pokitto library release

Dependencies:   PokittoLib

Pokitto "Hello World!" example

Press "Import into Compiler" on the top right of this page to try this code yourself!

/media/uploads/Pokitto/hello.jpg

Committer:
Pokitto
Date:
Fri Sep 14 07:40:54 2018 +0000
Revision:
15:90fbbbf47b22
Parent:
5:c4a0391b43ac
Child:
17:2bf164ef973d
added printf example

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Pokitto 0:2d2a3994d55d 1 #include "Pokitto.h"
Pokitto 0:2d2a3994d55d 2
Pokitto 0:2d2a3994d55d 3 Pokitto::Core mygame;
Pokitto 0:2d2a3994d55d 4
Pokitto 0:2d2a3994d55d 5 int main () {
Pokitto 0:2d2a3994d55d 6 mygame.begin();
Pokitto 0:2d2a3994d55d 7 while (mygame.isRunning()) {
Pokitto 0:2d2a3994d55d 8 if (mygame.update()) {
Pokitto 15:90fbbbf47b22 9 mygame.display.println("Hello World!");
Pokitto 15:90fbbbf47b22 10 /* Below is an example of printf, the ability print formatted strings */
Pokitto 15:90fbbbf47b22 11 /* Remove the two slashes '//' to uncomment it and see it in action */
Pokitto 15:90fbbbf47b22 12 /* Add the // back in the beginning of the line to comment it out again */
Pokitto 15:90fbbbf47b22 13 mygame.display.printf("\nA random\nnumber:%d",random(100));
Pokitto 0:2d2a3994d55d 14 }
Pokitto 0:2d2a3994d55d 15 }
Pokitto 0:2d2a3994d55d 16
Pokitto 0:2d2a3994d55d 17 }