nrf5/examples: Updating ssd1306.py example with a comment describing proceedure on how to use the I2C variant of the driver.

This commit is contained in:
Glenn Ruben Bakke 2017-02-02 23:50:43 +01:00
parent e8b4a97d7d
commit 5ae960947c

View File

@ -1,5 +1,14 @@
# MicroPython SSD1306 OLED driver, I2C and SPI interfaces
# Example usage for I2C on pca10040 / pca10056
#
# from machine import Pin, I2C
# from ssd1306 import SSD1306_I2C
# self.scl = Pin("A3", mode=Pin.OUT, pull=Pin.PULL_UP)
# self.sda = Pin("A4", mode=Pin.OUT, pull=Pin.PULL_UP)
# self.i2c = I2C(0, self.scl, self.sda)
# self.ssd = SSD1306_I2C(128, 64, self.i2c)
import time
import framebuf
from machine import SPI, Pin