|
| 1 | +# SH110X OLED Readme |
| 2 | + |
| 3 | +## Table of contents |
| 4 | + |
| 5 | + * [Overview](#overview) |
| 6 | + * [Hardware](#hardware) |
| 7 | + * [Software](#software) |
| 8 | + * [File system](#file-system) |
| 9 | + * [I2C](#i2c) |
| 10 | + * [Bitmaps](#bitmaps) |
| 11 | + |
| 12 | + |
| 13 | +## Overview |
| 14 | + |
| 15 | +* Name : SH110X |
| 16 | +* Description : |
| 17 | + |
| 18 | +0. Library to support the I2C 128X64 OLED Display Module |
| 19 | + driven by the Sh1106 or Sh1107 controller for the Raspberry PI. |
| 20 | +1. Dynamic install-able system level Raspberry Pi C++ library. |
| 21 | +2. Inverse color, rotate, sleep, scroll and contrast control. |
| 22 | +3. Bitmaps supported. |
| 23 | +4. Hardware I2C |
| 24 | + |
| 25 | + |
| 26 | +## Hardware |
| 27 | + |
| 28 | +Manufacturers diagram showing connections. |
| 29 | + |
| 30 | +[](https://github.com/gavinlyonsrepo/SSD1306_OLED_RPI/blob/main/extras/image/wiring.jpg) |
| 31 | + |
| 32 | +## Software |
| 33 | + |
| 34 | +### File system |
| 35 | + |
| 36 | +Not many examples files as I did not have device for test. |
| 37 | +These where tested by a third party. |
| 38 | + |
| 39 | +Example files |
| 40 | + |
| 41 | +| Controller | Filepath | File Function | Screen Size | |
| 42 | +| ---- | ---- | ---- | ---- | |
| 43 | +| Sh1106 | HELLO_WORLD | Basic use case | 128x64 | |
| 44 | +| SH1106 | BITMAP | Shows use of bitmaps | 128x64 | |
| 45 | +| Sh1107 | HELLO_WORLD | Basic use case | 128x64 | |
| 46 | + |
| 47 | +### I2C |
| 48 | + |
| 49 | +Hardware I2C. |
| 50 | + |
| 51 | +1. I2C Address is set by default to 0x3C(your module could be different, |
| 52 | + user can change argument passed into "OLEDbegin" method). |
| 53 | + |
| 54 | +2. I2C Clock rate can be a passed into in the LCD class constructor method as a argument, |
| 55 | +User can pass 1 of 4 BCM2835_I2C_CLOCK_DIVIDER values 2500, 626 150 or 148. |
| 56 | +See image below. |
| 57 | + |
| 58 | +3. In the event of an error writing a byte, debug info with error code will be written to console. |
| 59 | + This error code is the bcm2835I2CReasonCodes enum. Debug flag must be set to true to see this output. |
| 60 | + See image below for bcm2835I2CReasonCodes. |
| 61 | + |
| 62 | +[](https://github.com/gavinlyonsrepo/SSD1306_OLED_RPI/blob/main/extras/image/bcm.jpg) |
| 63 | + |
| 64 | +For more info on bcm2835I2CClockDivider & bcm2835I2CReasonCodes see [bcm2835 doc's for details](http://www.airspayce.com/mikem/bcm2835/group__constants.html) |
| 65 | + |
| 66 | +### Bitmaps |
| 67 | + |
| 68 | +Different bitmaps methods can be used. |
| 69 | + |
| 70 | +| num | Method name | data addressing | Notes | |
| 71 | +| ------ | ------ | ------ | ------ | |
| 72 | +| 1 | drawBitmap() | Vertical | default, setDrawBitmapAddr(true) | |
| 73 | +| 2 | drawBitmap() | Horizontal | setDrawBitmapAddr(false) | |
| 74 | + |
| 75 | +Bitmaps can be turned to data [here at link]( https://javl.github.io/image2cpp/) |
| 76 | +See example file "BITMAP" for more details. |
0 commit comments