Driver and example for SSD1306 128x64 I2C display (#254)

This commit is contained in:
urx 2016-10-28 16:08:37 +04:00 committed by sheinz
parent e71919410d
commit 5b12ba54dc
9 changed files with 644 additions and 0 deletions

27
extras/ssd1306/README.md Normal file
View file

@ -0,0 +1,27 @@
# Driver for I2C SSD1306 128x64 OLED LCD
This driver is written for usage with the ESP8266 and FreeRTOS ([esp-open-rtos](https://github.com/SuperHouse/esp-open-rtos)).
### Usage
Before using the SSD1306 LCD module, the function `i2c_init(SCL_PIN, SDA_PIN)` needs to be called to setup the I2C interface and then you must call ssd1306_init().
#### Example
```
#define SCL_PIN GPIO_ID_PIN(0)
#define SDA_PIN GPIO_ID_PIN(2)
...
i2c_init(SCL_PIN, SDA_PIN);
if (ssd1306_init()) {
// An error occured, while performing SSD1306 init init (E.g device not found etc.)
}
// rest of the code
```