/* e-Gizmo Graphic LCD I/F Hello World sample code This program is for e-gizmo Graphic LCD I/F to display text message on the LCD. Wire Connections Gizduino+644P - Graphic LCD POWER +5V - VIN GND - GND SCK D13 - SCLK MOSI D11 - SID CS D10 - CS1 RST D08 - /RST A0 D09 - RS Modified by e-Gizmo Mechatronix Central August 29,2015 */ //Universal GLCD library #include "U8glib.h" //Pin assignment U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8 * void draw(void) { // graphic commands to redraw the complete screen should be placed here u8g.setFont(u8g_font_unifont); //Unflip origin pos u8g.setPrintPos(21, 19); //flip origin pos //u8g.setPrintPos(0,11); // call procedure from base class, http://arduino.cc/en/Serial/Print u8g.print("Hello World!"); } void setup(void) { // flip screen, if required // u8g.setRot180(); } void loop(void) { // picture loop u8g.firstPage(); do { draw(); } while( u8g.nextPage() ); // rebuild the picture after some delay delay(500); }