Skip to content

Commit

Permalink
Version 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinlyonsrepo committed Mar 20, 2024
1 parent 4dd7666 commit 5cdab07
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 12 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
* Run following command to download latest release from github.

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion examples/bicolor_displays/sh1106/HELLO_WORLD/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
@file examples/bicolor_displays/sh1106/HELLO_WORLD/main.cpp
@author Gavin Lyons
@brief Test file for Sh1106_OLED display, showing "hello world" basic use case
@brief Test file for Sh1106 OLED display, showing "hello world" basic use case
Project Name: Display_Lib_RPI
@test
Expand Down
7 changes: 5 additions & 2 deletions extra/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ Version control history
* Displays supported in first version(st7735 ssd1306 ch1115 erm19264 hd44780 tm1638 nokia5110 max7219)

* Version 1.2.0 03-2024
* Added Support for ST7789 LCD
* added Support for ILI9341 LCD with XPT2046 touchscreen support.
* Added Support for ST7789 LCD.
* Added Support for ILI9341 LCD with XPT2046 touchscreen support.

* Version 1.3.0 20-03-2024
* Added Support for Sh1106 & Sh1107 OLED I2C.
76 changes: 76 additions & 0 deletions extra/doc/sh110x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# SH110X OLED Readme

## Table of contents

* [Overview](#overview)
* [Hardware](#hardware)
* [Software](#software)
* [File system](#file-system)
* [I2C](#i2c)
* [Bitmaps](#bitmaps)


## Overview

* Name : SH110X
* Description :

0. Library to support the I2C 128X64 OLED Display Module
driven by the Sh1106 or Sh1107 controller for the Raspberry PI.
1. Dynamic install-able system level Raspberry Pi C++ library.
2. Inverse color, rotate, sleep, scroll and contrast control.
3. Bitmaps supported.
4. Hardware I2C


## Hardware

Manufacturers diagram showing connections.

[![ 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)

## Software

### File system

Not many examples files as I did not have device for test.
These where tested by a third party.

Example files

| Controller | Filepath | File Function | Screen Size |
| ---- | ---- | ---- | ---- |
| Sh1106 | HELLO_WORLD | Basic use case | 128x64 |
| SH1106 | BITMAP | Shows use of bitmaps | 128x64 |
| Sh1107 | HELLO_WORLD | Basic use case | 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](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)

For more info on bcm2835I2CClockDivider & bcm2835I2CReasonCodes see [bcm2835 doc's for details](http://www.airspayce.com/mikem/bcm2835/group__constants.html)

### 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]( https://javl.github.io/image2cpp/)
See example file "BITMAP" for more details.
6 changes: 2 additions & 4 deletions extra/doc/ssd1306/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ Different bitmaps methods can be used.

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

Bitmaps can be turned to data [here at link]( https://javl.github.io/image2cpp/)
See example file "BITMAP" for more details.
Expand Down
7 changes: 5 additions & 2 deletions src/sh110X/SH110X_OLED_RDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ void SH110X_RDL::OLEDinit()
}
}

/*!
@brief Handles OLED reset, if reset pin present on device.
*/
void SH110X_RDL::OLEDReset(void)
{
const uint8_t resetDelay = 10; /**< reset delay in miliseconds*/
Expand Down Expand Up @@ -322,8 +325,8 @@ void SH110X_RDL::OLEDFillScreen(uint8_t dataPattern, uint8_t delay)
}

/*!
@brief Fill the chosen page(1-8) with a datapattern
@param page_num chosen page (1-8)
@brief Fill the chosen page with a data pattern
@param page_num chosen page (1-X)
@param dataPattern can be set to 0 to FF (not buffer)
@param mydelay optional delay in milliseconds can be set to zero normally.
*/
Expand Down

0 comments on commit 5cdab07

Please sign in to comment.