meshcore_py/examples/serial_infos.py

17 lines
284 B
Python
Raw Permalink Normal View History

2025-03-29 12:32:10 +01:00
#!/usr/bin/python
import asyncio
2025-07-10 17:24:01 +02:00
from meshcore import MeshCore, EventType
2025-03-30 08:36:39 +02:00
2025-04-08 22:56:16 -07:00
PORT = "/dev/tty.usbserial-583A0069501"
2025-03-30 08:36:39 +02:00
BAUDRATE = 115200
2025-03-29 12:32:10 +01:00
2025-04-08 22:56:16 -07:00
async def main():
mc = await MeshCore.create_serial(PORT, BAUDRATE)
2025-07-10 17:24:01 +02:00
2025-03-29 12:32:10 +01:00
print(mc.self_info)
2025-04-08 22:56:16 -07:00
await mc.disconnect()
2025-03-29 12:32:10 +01:00
asyncio.run(main())