mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
Merge branch 'main' into eventing-refactor
This commit is contained in:
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())
|
||||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "meshcore"
|
name = "meshcore"
|
||||||
version = "0.4"
|
version = "0.4.2"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user