mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 19:56:53 +00:00
some examples
This commit is contained in:
18
examples/node_infos.py
Executable file
18
examples/node_infos.py
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from meshcore import TCPConnection
|
||||
from meshcore import MeshCore
|
||||
import asyncio
|
||||
|
||||
HOSTNAME = "mchome"
|
||||
PORT = 5000
|
||||
|
||||
async def main () :
|
||||
con = TCPConnection(HOSTNAME, PORT)
|
||||
await con.connect()
|
||||
mc = MeshCore(con)
|
||||
await mc.connect()
|
||||
|
||||
print(mc.self_info)
|
||||
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user