mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
chan_msg example
This commit is contained in:
parent
c11e527442
commit
2608e27ca0
1 changed files with 20 additions and 0 deletions
20
examples/ble_t1000_chan_msg.py
Executable file
20
examples/ble_t1000_chan_msg.py
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
from meshcore import MeshCore
|
||||
from meshcore import BLEConnection
|
||||
|
||||
ADDRESS = "t1000" # node ble adress or name
|
||||
DEST = "mchome"
|
||||
MSG = "Hello World"
|
||||
|
||||
async def main () :
|
||||
con = BLEConnection(ADDRESS)
|
||||
await con.connect()
|
||||
mc = MeshCore(con)
|
||||
await mc.connect()
|
||||
|
||||
await mc.send_chan_msg(0, MSG)
|
||||
|
||||
asyncio.run(main())
|
||||
Loading…
Add table
Add a link
Reference in a new issue