diff --git a/docs/software/python/usage.md b/docs/software/python/usage.md index 2a8a325c..baf49a1d 100644 --- a/docs/software/python/usage.md +++ b/docs/software/python/usage.md @@ -7,8 +7,13 @@ sidebar_label: Python usage An example using Python 3 code to send a message to the mesh: ```python import meshtastic -interface = meshtastic.SerialInterface() # By default will try to find a meshtastic device, otherwise provide a device path like /dev/ttyUSB0 -interface.sendText("hello mesh") # or sendData to send binary data, see documentations for other options. +import meshtastic.serial_interface + +# 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() ```