mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
some examples were swapped
This commit is contained in:
@@ -3,15 +3,14 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import json
|
import json
|
||||||
from meshcore import MeshCore
|
from meshcore import MeshCore
|
||||||
from meshcore import TCPConnection
|
from meshcore import BLEConnection
|
||||||
|
|
||||||
HOSTNAME = "mchome"
|
ADDRESS = "t1000" # node ble adress or name
|
||||||
PORT = 5000
|
DEST = "mchome"
|
||||||
DEST = "t1000"
|
|
||||||
MSG = "Hello World"
|
MSG = "Hello World"
|
||||||
|
|
||||||
async def main () :
|
async def main () :
|
||||||
con = TCPConnection(HOSTNAME, PORT)
|
con = BLEConnection(ADDRESS)
|
||||||
await con.connect()
|
await con.connect()
|
||||||
mc = MeshCore(con)
|
mc = MeshCore(con)
|
||||||
await mc.connect()
|
await mc.connect()
|
||||||
|
|||||||
@@ -3,14 +3,15 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import json
|
import json
|
||||||
from meshcore import MeshCore
|
from meshcore import MeshCore
|
||||||
from meshcore import BLEConnection
|
from meshcore import TCPConnection
|
||||||
|
|
||||||
ADDRESS = "t1000" # node ble adress or name
|
HOSTNAME = "mchome"
|
||||||
DEST = "mchome"
|
PORT = 5000
|
||||||
|
DEST = "t1000"
|
||||||
MSG = "Hello World"
|
MSG = "Hello World"
|
||||||
|
|
||||||
async def main () :
|
async def main () :
|
||||||
con = BLEConnection(ADDRESS)
|
con = TCPConnection(HOSTNAME, PORT)
|
||||||
await con.connect()
|
await con.connect()
|
||||||
mc = MeshCore(con)
|
mc = MeshCore(con)
|
||||||
await mc.connect()
|
await mc.connect()
|
||||||
|
|||||||
Reference in New Issue
Block a user