Skip to content

Commit 0f13d54

Browse files
authored
Clarify serial port URL format on windows and macOS
Readme changes
2 parents 2d3a44d + 7bb6d7a commit 0f13d54

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,33 @@ Common platforms are support installation from PyPI using:
1515

1616
`pip install twinleaf`
1717

18-
19-
## Use
18+
## Programming
2019

2120
Examples of basic usage can be found in the `examples` directory.
2221

23-
A console script `itl` is installed to provide an interactive tool for configuring devices. We strongly
24-
22+
A console script `itl` is installed to provide an interactive tool for configuring devices as well.
2523

2624
## Programming
2725

2826
The `twinleaf` module performs metaprogramming to construct an object that has methods that match the RPC calls available on the device. To interact with a Twinleaf CSB current supply, for example:
2927

3028
```python
3129
import twinleaf
32-
csb = twinleaf.Device('COM1')
30+
csb = twinleaf.Device('serial://COM1')
3331
csb.settings.coil.x.current(0.25) # mA
3432
```
3533

3634
To receive data streams from a sensor such as the [Twinleaf VMR vector magnetometer](http://www.twinleaf.com/vector/VMR), use the named streams:
3735

3836
```python
3937
import twinleaf
40-
vmr = twinleaf.Device()
38+
vmr = twinleaf.Device('serial://COM1')
4139
print(vmr.samples.vector(10))
4240
```
41+
To find possible tio ports to use run `tio-proxy --enum`. Windows will often output some COMx port such as `serial://COM3`, while Mac OS will output some cu.XXXXX or tty.XXXXX name such as `serial:///dev/cu.usbserialXXXXXX` or `serial:///dev/tty.usbmodemXXXXXX`.
42+
43+
If `tio-proxy --enum` does not work try looking at serial ports in the respective OS device manager for active serial ports.
44+
4345

4446
## Migration from `tio-python`
4547

0 commit comments

Comments
 (0)