Hello, i am trying to connect two edu tello drones for a drone show for a python project on pycharm. I tried to connect them on the same network using UDP. on ip 192.168.10.1. I used different dongles and even changed the ip addresses to match 192.168.10.X format. But only one drone connects at a time
here is my code:
from djitellopy import Tello
# Setting up the first drone
drone1 = Tello(host='192.168.10.1')
drone1.connect()
print("Drone 1 Battery percentage:", drone1.get_battery())
# Setting up the second drone
drone2 = Tello(host='192.168.10.1')
drone2.CONTROL_UDP_PORT = 8890 # Different port for the second drone
drone2.connect()
print("Drone 2 Battery percentage:", drone2.get_battery())
and here is the output:
C:\Users\LENOVO\Desktop\CVZone\Advance_AI_drone\.venv\Scripts\python.exe "C:\Users\LENOVO\Desktop\CVZone\Advance_AI_drone\Multi Drone Show\battery_chcek.py"
[INFO] tello.py - 129 - Tello instance was initialized. Host: '192.168.10.1'. Port: '8889'.
[INFO] tello.py - 438 - Send command: 'command'
[INFO] tello.py - 462 - Response command: 'ok'
[INFO] tello.py - 129 - Tello instance was initialized. Host: '192.168.10.1'. Port: '8889'.
[INFO] tello.py - 438 - Send command: 'command'
Drone 1 Battery percentage: 67
[INFO] tello.py - 462 - Response command: 'ok'
Drone 2 Battery percentage: 67
it seems to be connecting to the same drone. i tried changing ip to 2 3 too but in vain Tried turning off firewall too
How can i tackle this issue? i have updated my firmware as well.
here is my code:
from djitellopy import Tello
# Setting up the first drone
drone1 = Tello(host='192.168.10.1')
drone1.connect()
print("Drone 1 Battery percentage:", drone1.get_battery())
# Setting up the second drone
drone2 = Tello(host='192.168.10.1')
drone2.CONTROL_UDP_PORT = 8890 # Different port for the second drone
drone2.connect()
print("Drone 2 Battery percentage:", drone2.get_battery())
and here is the output:
C:\Users\LENOVO\Desktop\CVZone\Advance_AI_drone\.venv\Scripts\python.exe "C:\Users\LENOVO\Desktop\CVZone\Advance_AI_drone\Multi Drone Show\battery_chcek.py"
[INFO] tello.py - 129 - Tello instance was initialized. Host: '192.168.10.1'. Port: '8889'.
[INFO] tello.py - 438 - Send command: 'command'
[INFO] tello.py - 462 - Response command: 'ok'
[INFO] tello.py - 129 - Tello instance was initialized. Host: '192.168.10.1'. Port: '8889'.
[INFO] tello.py - 438 - Send command: 'command'
Drone 1 Battery percentage: 67
[INFO] tello.py - 462 - Response command: 'ok'
Drone 2 Battery percentage: 67
it seems to be connecting to the same drone. i tried changing ip to 2 3 too but in vain Tried turning off firewall too
How can i tackle this issue? i have updated my firmware as well.