Hello Tello Pilot!
Join our DJI Tello community & remove this banner.
Sign up

My first python program

Skywalker

Member
Joined
Oct 28, 2018
Messages
20
Reaction score
7
Location
México
This is the code I wrote today. It read the battery level:

import socket

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

sock.sendto(b'command', 0, ('192.168.10.1', 8889))
sock.sendto(b'battery?', 0, ('192.168.10.1', 8889))

while True:
data, ip = sock.recvfrom(1024)
print("{}: {}".format(ip, data.decode()))
 
  • Like
Reactions: FlandersNed

New Threads

Members online

Forum statistics

Threads
3,251
Messages
25,151
Members
8,380
Latest member
RyanBrentShampy