OLED 128x64 Hello World Displays

  • img
Project Details

This is a quick sample code for 128x64 pixel monochrome OLED displays. These displays are small, only about 1" diagonal, but very readable due to the high contrast of an OLED display. Each OLED display is made of 128x64 or 128x32 individual white OLEDs, each one is turned on or off by the controller chip SSD1306. Because the display makes its own light, no backlight is required. This reduces the power required to run the OLED and is why the display has such high contrast; we really like this miniature display for its crispness!

Wiring

Finally, connect the pins to your CloudX, The OLED display uses I2C serial communication protocol and it only has four pins, VCC, GND, SCL and SDA respectively.

GND goes to GND of cloudx

VCC goes to 5V of the MCU

SDA to  SDA 

SCL goes to SCL pin of cloudx

 

Code

#include 
#include

setup(){
OLED_setting();
OLED_writeText("WELCOME", 2, 4);
OLED_writeText("to", 3, 8);
OLED_writeText("BYTEHUB EMBEDDED", 4, 0);


loop(){


}
}
 

Share this with friends