mirror of
https://github.com/meshtastic/python.git
synced 2025-12-31 20:08:02 -05:00
Added examples/tcp_gps_example.py
This commit is contained in:
12
examples/tcp_gps_example.py
Normal file
12
examples/tcp_gps_example.py
Normal file
@@ -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