鸿蒙HarmonyOS and 大疆Tello 无人机 BUILD SUCCESS
https://harmonyos.51cto.com/#bkwz
利用鸿蒙Hispark WIFI IOT 套件控制大疆TELLO 无人机
第一步:查看无人机通信协议:
第二步:结合许老师的UDP网络编程--UDP demo 写入无人机的wifi名称,密码,ip地址,端口
第三步:查看无人机开放的SDK得知相关的命令
SDK链接入下:
https://dl.djicdn.com/downloads/RoboMaster%20TT/Tello_SDK_3.0_User_Guide.pdf
第四步:编写客户端代码
retval = sendto(sockfd, "command", sizeof("command"), 0, (struct sockaddr *)&toAddr, sizeof(toAddr)); printf("send UDP message {%s} %ld done!\r\n","command", retval); osDelay(500); retval = sendto(sockfd, "takeoff", sizeof("takeoff"), 0, (struct sockaddr *)&toAddr, sizeof(toAddr)); printf("send UDP message {%s} %ld done!\r\n","takeoff", retval); osDelay(800); retval = sendto(sockfd, "up 50", sizeof("up 50"), 0, (struct sockaddr *)&toAddr, sizeof(toAddr)); printf("send UDP message {%s} %ld done!\r\n","up 50", retval); osDelay(500); //部分指令
由于这个无人机的服务端已经封装好的,在监听模式,所以只给他传输命令即可!
第五步:把两个BUILD.gn文件里面内容检测完毕,即可进入编译
看到BUILD SUCCESS,基本大工告成!
第六步:开机测试,附上串口打印的信息
总体上还好,不过还存在指令在传输过程中丢失的情况,5个命令,有时候传过去了4个或者3个。
学习链接如下:许老师课程:https://edu.51cto.com/course/25739.html?hm
Harmony OS进行网络编程 demo链接:https://gitee.com/hihopeorg/HarmonyOS-IoT-Application-Development/tree/master/05_network
测试视频链接如下:(视频还没通过审核,会在我的主页)
https://harmonyos.51cto.com/person/posts/14938621?tabIndex=2
如有问题,请各位老师纠正!
相关附件可以点击原文链接前往下载:https://harmonyos.51cto.com/posts/1795
https://harmonyos.51cto.com/#bkwz
- 鸿蒙系统开源学习经验分享HarmonyOS[www.allharmonyos.com]
- Redis Desktop Manager - Redis GUI management tool for Windows, Mac OS X, Ubuntu and Debian.
- 本周技术关注[面向webapps运维]:Manual Documentation or Tech Archives Resource for OS 、DB and Development
- Symbian development on Linux and OS X
- checkio-Xs and Os Referee
- Database Crash With ORA-27063 and OS Error: 5: I/O Error
- Android--鸿蒙OS
- HOWTO: Install, Build and Use openCV (MacOSX 10.10)
- For installing windows 7 and ubuntu double os
- Bash/KSH/SH Shell: Find The Length Of a String On a UNIX, Linux, BSD, and OS X
- codeforce 453B - Little Pony and Harmony Chest
- iOS and OS X Network Programming Cookbook |Creating an echo server(BSD)
- Would It affect RAC clusterware and database If we adjust OS time/Clock?
- iOS and OS X Network Programming Cookbook |Creating an echo server(Bonjour)(上)
- 关于 Dead Connection Detection, Resource Limits, V$SESSION, V$PROCESS and OS processes ( 601605.1)
- capture screen activity to a movie file using AV Foundation on OS X 10.7 Lion and later
- 索引分配between LINUX and UNIX OS
- zend studio 设置Unix and os X(\n)换行
- Mac OS X - A step-by-step guide to installing Go and building your first web service
- Pix4D.Pix4Dmapper.Pro.v2.0.104.MacOSX 1CD(无人机数据处理软件)