mirror of
https://github.com/meshtastic/python.git
synced 2026-09-14 14:28:24 -04:00
Added examples/tcp_gps_example.py
This commit is contained in:
1 parent
6fbf78fa19
commit
ef9441e7d2
1 file changed
+12
@@ -0,0 +1,12 @@
|
||||
import sys
|
||||
import meshtastic
|
||||
import meshtastic.tcp_interface
|
||||
|
||||
node_ip = "192.168.42.1"
|
||||
iface = meshtastic.tcp_interface.TCPInterface(node_ip)
|
||||
my_node_num = iface.myInfo.my_node_num
|
||||
pos = iface.nodesByNum[my_node_num]["position"]
|
||||
print (pos)
|
||||
|
||||
iface.close()
|
||||
|
||||
Reference in new issue
Block a user