Thu Jan 22, 2015 3:13 pm
Thu Jan 22, 2015 4:06 pm
#include <SPI.h>
#include <Gamebuino.h>
Gamebuino gb;
char text[13] = "Default text";
void setup(){
gb.begin();
gb.titleScreen(F("Keyword example"));
gb.keyboard(text, 13);
}
void loop(){
if(gb.update()){
gb.display.println(F("You wrote:"));
gb.display.println(text);
if(strstr(text,":)")){
gb.display.println(F("Nice Smiley!"));
}
if(gb.buttons.pressed(BTN_C)){
gb.titleScreen(F("Keyword example"));
gb.keyboard(text, 13);
}
}
}
Thu Jan 22, 2015 9:51 pm