Fix SPI speed on RFM22B init script.

pull/2/head
Mark Jessop 2018-01-29 20:04:26 +10:30
rodzic b0858d0b34
commit 2eeb0cb5e0
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -156,6 +156,7 @@ class RFM22B(object):
def __init__(self,device=1): def __init__(self,device=1):
self.spi = spidev.SpiDev() self.spi = spidev.SpiDev()
self.spi.open(0,device) self.spi.open(0,device)
self.spi.max_speed_hz = 1000000
if not self.check_connection(): if not self.check_connection():
print("Init Failed!") print("Init Failed!")