Skip to content

Commit ad3164c

Browse files
committed
Use busio which does bitbanging on ESP8266 and native on SAMD
1 parent bc1f002 commit ad3164c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

examples/simpletest.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@
55

66
# Import all board pins.
77
from board import *
8-
# Use this import for ESP8266 and other boards with software I2C interfaces:
9-
import bitbangio as io
10-
# Or use this import for SAMD21 and boards with a native hardware I2C interace:
11-
#import nativeio as io
8+
import busio
129

1310
# Import the SSD1306 module.
1411
import adafruit_ssd1306
1512

1613

1714
# Create the I2C interface.
18-
i2c = io.I2C(SCL, SDA)
15+
i2c = busio.I2C(SCL, SDA)
1916

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

0 commit comments

Comments
 (0)