I have an UCTRONICS 128x64 OLED Display connected to an Arduino Uno via I2C. The displays I2C address is 0x3C(According to manual and I2C scanner sketch) The display is powered from the 5v pin on the Arduino. Gnd's are connected. The Displays SDA pin is connected to Arduino pin A4 and SCL is connected to pin A5. The display works fine using the Adafruit SSD 1306, OLED_I2C, and ArducamSSD1306(Recommened by UTCRONICS) libraries. However, i want to try and communicate with it using the Liquid crystal library(Specificly the LiquidCrystal_SSD1306 ). I have used the example Hello World sketch and the screen displays boxes rather then the corresponding characters. However, one box is shown where each character should be. I am not partial to using one library over the other. Am just trying to get the screen to work via the Liquid Crystal in order to communicate with it via LCDSmartie(for now). Below is the modified sketch:
#include <Wire.h>
#include <LiquidCrystal_SSD1306.h>
// initialize the library with the numbers of the interface pins
#define OLED_RESET 16
LiquidCrystal_SSD1306 lcd(SSD1306_SWITCHCAPVCC, SSD1306_I2C_ADDRESS, 16); // I2C Address is 0x3C
void setup() {
lcd.begin(21,8); //21 Column, 8 rows
lcd.setCursor(5,0); // left/right, up/down
lcd.print("Hello World"); //Prints Message
}
void loop() {
}
Thank You