- Name : SSD1306_OLED
- Description :
- Library to support the I2C 128X64 OLED Display Module driven by the SSD1306 controller for the Raspberry PI.
- Dynamic install-able system level Raspberry Pi C++ library.
- Inverse color, rotate, sleep, scroll and contrast control.
- Bitmaps supported.
- Hardware I2C
- Also tested on 128X32 display size. Should work for 96X16 display size.
Manufacturers diagram showing connections.
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 |
Hardware I2C.
-
I2C Address is set by default to 0x3C(your module could be different, user can change argument passed into "OLEDbegin" method).
-
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.
-
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.
For more info on bcm2835I2CClockDivider & bcm2835I2CReasonCodes see bcm2835 doc's for details
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.
- 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 |