Skip to content

Commit 5cdab07

Browse files
Version 1.3.0
1 parent 4dd7666 commit 5cdab07

6 files changed

Lines changed: 93 additions & 12 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@
4242
* Run following command to download latest release from github.
4343

4444
```sh
45-
curl -sL https://github.com/gavinlyonsrepo/Display_Lib_RPI/archive/1.2.0.tar.gz | tar xz
45+
curl -sL https://github.com/gavinlyonsrepo/Display_Lib_RPI/archive/1.3.0.tar.gz | tar xz
4646
```
4747

4848
3. Run 'make' and 'sudo make install' to run the makefile to build and then install library.
4949
* It will be installed to usr/local/lib and usr/local/include by default.
5050
* You can run 'make help' here to see other make options(uninstall etc).
5151

5252
```sh
53-
cd Display_Lib_RPI-1.2.0
53+
cd Display_Lib_RPI-1.3.0
5454
make
5555
sudo make install
5656
```
@@ -99,7 +99,8 @@ Display category name path table:
9999
| Nokia 5110 PCD8544| Bi colour Graphic LCD |SPI HW & SW| [Readme](extra/doc/nokia5110/README.md) |
100100
| ERM1 CH1115 | Bi colour Graphic OLED |SPI HW & SW| [Readme](extra/doc/ch1115/README.md) |
101101
| SSD1306| Bi colour Graphic OLED | I2C | [Readme](extra/doc/ssd1306/README.md) |
102-
| HD44780 PCF8574 | Character LCD | I2C | [Readme](extra/doc/hd44780/README.md) |
102+
| SH1106 SH1107| Bi colour Graphic OLED | I2C | [Readme](extra/doc/sh110x/README.md) |
103+
| HD44780_PCF8574 | Character LCD | I2C | [Readme](extra/doc/hd44780/README.md) |
103104
| TM1638 | LED 7 segment display| ~SPI SW | [Readme](extra/doc/tm1638/README.md) |
104105
| MAX7219 | LED 7 segment display | SPI HW & SW| [Readme](extra/doc/max7219/README.md) |
105106

examples/bicolor_displays/sh1106/HELLO_WORLD/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
@file examples/bicolor_displays/sh1106/HELLO_WORLD/main.cpp
33
@author Gavin Lyons
4-
@brief Test file for Sh1106_OLED display, showing "hello world" basic use case
4+
@brief Test file for Sh1106 OLED display, showing "hello world" basic use case
55
Project Name: Display_Lib_RPI
66
77
@test

extra/doc/CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ Version control history
77
* Displays supported in first version(st7735 ssd1306 ch1115 erm19264 hd44780 tm1638 nokia5110 max7219)
88

99
* Version 1.2.0 03-2024
10-
* Added Support for ST7789 LCD
11-
* added Support for ILI9341 LCD with XPT2046 touchscreen support.
10+
* Added Support for ST7789 LCD.
11+
* Added Support for ILI9341 LCD with XPT2046 touchscreen support.
12+
13+
* Version 1.3.0 20-03-2024
14+
* Added Support for Sh1106 & Sh1107 OLED I2C.

extra/doc/sh110x/README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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+
[![ Wiring Image](https://github.com/gavinlyonsrepo/SSD1306_OLED_RPI/blob/main/extras/image/wiring.jpg)](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+
[![ bcm image](https://github.com/gavinlyonsrepo/SSD1306_OLED_RPI/blob/main/extras/image/bcm.jpg)](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.

extra/doc/ssd1306/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@ Different bitmaps methods can be used.
7373

7474
| num | Method name | data addressing | Notes |
7575
| ------ | ------ | ------ | ------ |
76-
| 1 | OLEDBitmap() |horizontal| Draws bitmaps to the buffer |
77-
| 2 | OLEDBuffer() |vertical | Write a full screen bitmap direct to screen, used internally|
78-
| 3 | drawBitmap() | Vertical | default, setDrawBitmapAddr(true) |
79-
| 4 | drawBitmap() | Horizontal | setDrawBitmapAddr(false) |
76+
| 1 | drawBitmap() | Vertical | default, setDrawBitmapAddr(true) |
77+
| 2 | drawBitmap() | Horizontal | setDrawBitmapAddr(false) |
8078

8179
Bitmaps can be turned to data [here at link]( https://javl.github.io/image2cpp/)
8280
See example file "BITMAP" for more details.

src/sh110X/SH110X_OLED_RDL.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ void SH110X_RDL::OLEDinit()
159159
}
160160
}
161161

162+
/*!
163+
@brief Handles OLED reset, if reset pin present on device.
164+
*/
162165
void SH110X_RDL::OLEDReset(void)
163166
{
164167
const uint8_t resetDelay = 10; /**< reset delay in miliseconds*/
@@ -322,8 +325,8 @@ void SH110X_RDL::OLEDFillScreen(uint8_t dataPattern, uint8_t delay)
322325
}
323326

324327
/*!
325-
@brief Fill the chosen page(1-8) with a datapattern
326-
@param page_num chosen page (1-8)
328+
@brief Fill the chosen page with a data pattern
329+
@param page_num chosen page (1-X)
327330
@param dataPattern can be set to 0 to FF (not buffer)
328331
@param mydelay optional delay in milliseconds can be set to zero normally.
329332
*/

0 commit comments

Comments
 (0)