Files
lowobservable.coax/pycoax/examples/11_reset.py
2019-12-23 18:15:32 -06:00

29 lines
487 B
Python
Executable File

#!/usr/bin/env python
import sys
import time
from serial import Serial
sys.path.append('..')
from coax import Interface1, reset
print('Opening serial port...')
with Serial('/dev/ttyUSB0', 115200) as serial:
print('Sleeping to allow interface time to wake up...')
time.sleep(3)
interface = Interface1(serial)
print('Resetting interface...')
version = interface.reset()
print(f'Firmware version is {version}')
print('RESET...')
reset(interface)