http://www.adafruit.com/products/823
I slightly modified the sample code to the following and it works as expected. But when I change the first line in loop() from home() to clear(), all hell broke loose. I sometimes don't see anything, sometimes see random characters, sometimes see the message on the wrong line.
The original sample code runs fine so I don't think connection was the problem, just including a clear() after initially printing something screws things up. Any thoughts? Thanks. I tried on both arduino 1.0 and 1.5
- Code: Select all
#include <Adafruit_CharacterOLED.h>
// initialize the library with the numbers of the interface pins
Adafruit_CharacterOLED lcd(6, 7, 8, 9, 10, 11, 12);
void setup()
{
// Print a message to the LCD.
lcd.begin(16, 2);
}
void loop()
{
lcd.home(); // Change this to lcd.home() it works but change it to lcd.clear() and the display screws up.
lcd.print("hello OLED World");
lcd.setCursor(0, 1);
lcd.print(millis()/1000);
delay(500);
}


