Skip to content

Commit

Permalink
Update pycoproc.py
Browse files Browse the repository at this point in the history
Lower baudrate to 100000 to avoid I2C errors
Removed old version from pyscan directory.
  • Loading branch information
Xykon committed Mar 26, 2019
1 parent d8c3af3 commit 681302a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 286 deletions.
4 changes: 2 additions & 2 deletions lib/pycoproc/pycoproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __init__(self, i2c=None, sda='P22', scl='P21'):
if i2c is not None:
self.i2c = i2c
else:
self.i2c = I2C(0, mode=I2C.MASTER, pins=(sda, scl))
self.i2c = I2C(0, mode=I2C.MASTER, pins=(sda, scl), baudrate=100000)

self.sda = sda
self.scl = scl
Expand Down Expand Up @@ -235,7 +235,7 @@ def calibrate_rtc(self):
self.i2c.deinit()
Pin('P21', mode=Pin.IN)
pulses = pycom.pulses_get('P21', 100)
self.i2c.init(mode=I2C.MASTER, pins=(self.sda, self.scl))
self.i2c.init(mode=I2C.MASTER, pins=(self.sda, self.scl), baudrate=100000)
idx = 0
for i in range(len(pulses)):
if pulses[i][1] > EXP_RTC_PERIOD:
Expand Down
284 changes: 0 additions & 284 deletions pyscan/lib/pycoproc.py

This file was deleted.

0 comments on commit 681302a

Please sign in to comment.