From 2608e27ca05693d55cd967af04146a5620684938 Mon Sep 17 00:00:00 2001 From: Florent Date: Fri, 11 Apr 2025 17:52:32 +0200 Subject: [PATCH] chan_msg example --- examples/ble_t1000_chan_msg.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 examples/ble_t1000_chan_msg.py diff --git a/examples/ble_t1000_chan_msg.py b/examples/ble_t1000_chan_msg.py new file mode 100755 index 0000000..996f718 --- /dev/null +++ b/examples/ble_t1000_chan_msg.py @@ -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())