Skip to content

Commit 2608e27

Browse files
committed
chan_msg example
1 parent c11e527 commit 2608e27

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

examples/ble_t1000_chan_msg.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/python
2+
3+
import asyncio
4+
import json
5+
from meshcore import MeshCore
6+
from meshcore import BLEConnection
7+
8+
ADDRESS = "t1000" # node ble adress or name
9+
DEST = "mchome"
10+
MSG = "Hello World"
11+
12+
async def main () :
13+
con = BLEConnection(ADDRESS)
14+
await con.connect()
15+
mc = MeshCore(con)
16+
await mc.connect()
17+
18+
await mc.send_chan_msg(0, MSG)
19+
20+
asyncio.run(main())

0 commit comments

Comments
 (0)