mirror of
https://github.com/lowobservable/coax.git
synced 2026-02-28 17:39:38 +00:00
18 lines
367 B
Python
Executable File
18 lines
367 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
from common import open_example_serial_interface
|
|
|
|
from coax import Poll, PollAck
|
|
|
|
with open_example_serial_interface(poll_flush=False) as interface:
|
|
print('POLL...')
|
|
|
|
poll_response = interface.execute(Poll(), timeout=5)
|
|
|
|
print(poll_response)
|
|
|
|
if poll_response:
|
|
print('POLL_ACK...')
|
|
|
|
interface.execute(PollAck())
|