- Joined
- Oct 29, 2021
- Messages
- 3
- Reaction score
- 1
All I do is, connect both Tellos' to different wifi dongles and send commands via socket programming, the operating system I am on is, Ubuntu 18.04 below is the code...
import socket
import time
drone_1 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
drone_1.setsockopt(socket.SOL_SOCKET, 25, 'wlxd03745aa6775'.encode()) #'wlxd03745aa6775' it will be different to your wifi dongle (check yours' using ifconfig command in Linux / Ubuntu OS).
drone_2 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
drone_2.setsockopt(socket.SOL_SOCKET, 25, 'wlxd03745ab21eb'.encode())
drone_1.sendto('command'.encode(), 0, ('192.168.10.1', 8889))
drone_2.sendto('command'.encode(), 0, ('192.168.10.1', 8889))
#%%Code to takeoff:
drone_1.sendto('takeoff'.encode(), 0, ('192.168.10.1', 8889))
drone_2.sendto('takeoff'.encode(), 0, ('192.168.10.1', 8889))
#%%Code to land:
drone_1.sendto('land'.encode(), 0, ('192.168.10.1', 8889))
drone_2.sendto('land'.encode(), 0, ('192.168.10.1', 8889))