AllenNeuralDynamics / AllenNeuralDynamics/harp.device.lickety-split
Update examples w/ cleaner serial code
Open
- Dominant language
- C++
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
We can simplify connecting to a device in all the examples with:
```python
import serial.tools.list_ports
# Open serial connection with the first Valve Controller.
com_port = None
ports = serial.tools.list_ports.comports()
for port, desc, hwid in sorted(ports):
if desc.startswith("lickety-split"):
print("{}: {} [{}]".format(port, desc, hwid))
com_port = port
break
device = Device(com_port)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.