Existing sensors complete
This commit is contained in:
@@ -28,6 +28,7 @@ def main():
|
||||
network.initialize()
|
||||
network_timer = Timer(1)
|
||||
network_reset_timer = Timer(600)
|
||||
prind(board.__dict__)
|
||||
|
||||
pps = PPS(board.GP22)
|
||||
imu = IMU(board.GP21, board.GP20, 0x0C, (44, 66, -109), (-1, 3, -1), (-7, -16, -39))
|
||||
@@ -42,6 +43,9 @@ def main():
|
||||
network_reset_timer.update(delta)
|
||||
gps.update(pps.utc)
|
||||
imu.update(pps.utc)
|
||||
|
||||
if network_timer.check_timer():
|
||||
network.update(pps.utc, network_reset_timer)
|
||||
|
||||
if not gps.has_fix:
|
||||
print(time.time())
|
||||
@@ -52,9 +56,6 @@ def main():
|
||||
if gps.time_updated:
|
||||
pps.update_from_gps(gps)
|
||||
|
||||
if network_timer.check_timer():
|
||||
network.update(pps.utc, network_reset_timer)
|
||||
|
||||
#if heartbeat_timer.check_timer():
|
||||
# message = bytearray(b'\xd4\x53\x6e\x4e\x00\x00\x00')
|
||||
# message[4] = pps.utc[0]
|
||||
|
||||
Reference in New Issue
Block a user