Skip to content

Commit

Permalink
Changed to use I2C and SPI from board instead of creating new object …
Browse files Browse the repository at this point in the history
…from busio
  • Loading branch information
bmeisels committed Feb 21, 2020
1 parent 85e5ad2 commit 3534841
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/arambadge.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Copyright (c) 2019 Uri Shaked

import board
import busio
from digitalio import DigitalInOut, Pull
from analogio import AnalogIn
import displayio
Expand Down Expand Up @@ -117,14 +116,14 @@ def pixels(self):
def i2c(self):
"""direct access to the I2C bus"""
if not self._i2c:
self._i2c = busio.I2C(board.SCL, board.SDA)
self._i2c = board.I2C()
return self._i2c

@property
def spi(self):
"""direct access to the SPI bus"""
if not self._spi:
self._spi = busio.SPI(board.SCK, MISO=board.MISO, MOSI=board.MOSI)
self._spi = board.SPI()
return self._spi

@property
Expand Down

0 comments on commit 3534841

Please sign in to comment.