kopia lustrzana https://github.com/projecthorus/wenet
Fix SPI speed on RFM22B init script.
rodzic
b0858d0b34
commit
2eeb0cb5e0
|
@ -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!")
|
||||||
|
|
Ładowanie…
Reference in New Issue