Skip to content

Latest commit

 

History

History
97 lines (65 loc) · 3.37 KB

README.md

File metadata and controls

97 lines (65 loc) · 3.37 KB

SSD1306 OLED Readme

 OLED image

Table of contents

Overview

  • Name : SSD1306_OLED
  • Description :
  1. Library to support the I2C 128X64 OLED Display Module driven by the SSD1306 controller for the Raspberry PI.
  2. Dynamic install-able system level Raspberry Pi C++ library.
  3. Inverse color, rotate, sleep, scroll and contrast control.
  4. Bitmaps supported.
  5. Hardware I2C
  6. Also tested on 128X32 display size. Should work for 96X16 display size.

Hardware

Manufacturers diagram showing connections.

 Wiring Image

Software

File system

Example files

Filepath File Function Screen Size
HELLO_WORLD Basic use case 128x64
BITMAP Shows use of bitmaps 128x64
CLOCK_DEMO A basic clock Demo 128x64
SPEED_TEST Frame rate per second test 128x64
TEXT_GRAPHICS_FUNCTIONS Tests Text,graphics and functions 128x64

I2C

Hardware I2C.

  1. I2C Address is set by default to 0x3C(your module could be different, user can change argument passed into "OLEDbegin" method).

  2. I2C Clock rate can be a passed into in the LCD class constructor method as a argument, User can pass 1 of 4 BCM2835_I2C_CLOCK_DIVIDER values 2500, 626 150 or 148. See image below.

  3. In the event of an error writing a byte, debug info with error code will be written to console. This error code is the bcm2835I2CReasonCodes enum. Debug flag must be set to true to see this output. See image below for bcm2835I2CReasonCodes.

 bcm image

For more info on bcm2835I2CClockDivider & bcm2835I2CReasonCodes see bcm2835 doc's for details

Bitmaps

Different bitmaps methods can be used.

num Method name data addressing Notes
1 drawBitmap() Vertical default, setDrawBitmapAddr(true)
2 drawBitmap() Horizontal setDrawBitmapAddr(false)

Bitmaps can be turned to data here at link See example file "BITMAP" for more details.

Output

 Output image

 Output image 2

Notes and issues

  1. To test on a different size of display edit the myOLEDwidth & myOLEDheight variables in examples files.
Display size Supported Tested
128x64 Yes Yes
128x32 Yes Yes
???x16 Yes NO