mirror of
https://github.com/meshtastic/meshtastic.git
synced 2025-02-02 08:42:11 -08:00
fix example
This commit is contained in:
parent
116dac7f81
commit
9bde16bde7
|
@ -7,8 +7,13 @@ sidebar_label: Python usage
|
||||||
An example using Python 3 code to send a message to the mesh:
|
An example using Python 3 code to send a message to the mesh:
|
||||||
```python
|
```python
|
||||||
import meshtastic
|
import meshtastic
|
||||||
interface = meshtastic.SerialInterface() # By default will try to find a meshtastic device, otherwise provide a device path like /dev/ttyUSB0
|
import meshtastic.serial_interface
|
||||||
interface.sendText("hello mesh") # or sendData to send binary data, see documentations for other options.
|
|
||||||
|
# By default will try to find a meshtastic device, otherwise provide a device path like /dev/ttyUSB0
|
||||||
|
interface = meshtastic.serial_interface.SerialInterface()
|
||||||
|
|
||||||
|
# or sendData to send binary data, see documentations for other options.
|
||||||
|
interface.sendText("hello mesh")
|
||||||
interface.close()
|
interface.close()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue