Skip to content

Commit

Permalink
Use busio which does bitbanging on ESP8266 and native on SAMD
Browse files Browse the repository at this point in the history
  • Loading branch information
tannewt committed Apr 11, 2017
1 parent bc1f002 commit ad3164c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions examples/simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@

# Import all board pins.
from board import *
# Use this import for ESP8266 and other boards with software I2C interfaces:
import bitbangio as io
# Or use this import for SAMD21 and boards with a native hardware I2C interace:
#import nativeio as io
import busio

# Import the SSD1306 module.
import adafruit_ssd1306


# Create the I2C interface.
i2c = io.I2C(SCL, SDA)
i2c = busio.I2C(SCL, SDA)

# Create the SSD1306 OLED class.
# The first two parameters are the pixel width and pixel height. Change these
Expand Down

0 comments on commit ad3164c

Please sign in to comment.