http://www.gammon.com.au/forum/?id=10940
Lista de Materiais:
IDE Arduino 1.0.6
1x Board Arduino UNO
1x Protoboard 830 furos
1x Cabo USB-A male to USB-B male
1x Conj. de fios jumper p/ protoboard
1x C.I. MCP23017 Microchip
1x Trimpot 10k
1x GLCD LCM12864J
Montagem:
Firmware:
#include <Wire.h>
#include <SPI.h>
#include <I2C_graphical_LCD_display.h>
I2C_graphical_LCD_display lcd;
byte picture [] PROGMEM = {
0x1C, 0x22, 0x49, 0xA1, 0xA1, 0x49, 0x22, 0x1C, // face
0x10, 0x08, 0x04, 0x62, 0x62, 0x04, 0x08, 0x10, // star destroyer
0x4C, 0x52, 0x4C, 0x40, 0x5F, 0x44, 0x4A, 0x51, // OK logo
};
void setup () {
lcd.begin ();
for (int i = ' '; i <= 0x7f; i++)
lcd.letter (i);
lcd.clear (6, 40, 30, 63, 0xFF);
lcd.gotoxy (40, 40);
lcd.string ("Nick Gammon.", true);
lcd.gotoxy (40, 56);
lcd.blit (picture, sizeof picture);
lcd.frameRect (40, 49, 60, 53, 1, 1);
lcd.line (6, 40, 30, 63, 0);
}
void loop () {
}
Download: I2C_graphical_LCD_display.h