当前位置:网站首页>#Internet of Things essay#Xiaoxiong pie equipment development actual combat

#Internet of Things essay#Xiaoxiong pie equipment development actual combat

2022-08-09 13:02:00 51CTO

(1)Various compiler environment construction and installation​

To extract the first small Xiong PaVMware镜像,Import open virtual machine,输入密码进入,打开终端查看IP地址,Then open the installationMobaXtermTool connection login,


#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量


Then the file usingRaiDriveTools to remotewindows上,添加ftpLogin for mapping success,

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_02


And then there are two ways to get the source code



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_03



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_04


(2)hello_world案例入门​

Download the good code with theVS打开,然后在applications下sample创建my_app文件夹,在文件夹下创建hello_world.c文件和BUILD.gnAfter writing business source

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_05



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_06


Then compile the source of business,打开MobaXterm工具编译

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_07


The use of a serial port tools and code burn


(3)点亮ledLamp case introduction​

To add lightled源码文件,包括led_example.c文件和BULID.gn文件,

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_08


然后编写业务代码,先添加头文件

Then the function,在函数中实现,先写初始化jpl,再添加ledLight up in chip pin number,设置gplReverse the output mode,The last set v.

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_09


然后编写BUILD.gn代码,Can copy on a case study combined with their relative path

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_10


然后在总的BUILD.gnNext add compiler module

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_11


Compilation is still useMobaXterm工具编译,Enter the source directory,进行编译

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_12



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_13


And then enter the development board,Because no development board so it doesn't know what code to run if wrong​

1.编译模块:编译是通过BearPi-HM_Nano.json把.c文件编译成.a文件​

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_14


最后把所有的.a文件打包成.bin二进制文件,Then put the binary file onto/development board

2.鸿蒙与CMSIS-RTOS2接口联系

鸿蒙在CMSIS-RTOS2接口中封装了LiteOS-m的内核代码,

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_15



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_16


鸿蒙内核开发——任务管理​

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_17



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_18



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_19


强调重点理解任务ID、任务栈、任务切换

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_20


实现任务管理

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_21



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_22



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_23



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_24


出现这种连接超时的情况是因为IP地址改变了,需要在虚拟机上右键点击打开终端输入ifconfig复制新的IP地址,然后重新在Moba工具中建立SSH重新映射到Windows下

编译结果:

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_25


软件定时器

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_26



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_27



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_28



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_29

信号量​

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_30



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_31



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_32



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_33



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_34


拓展实验修改信号量:

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_35



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_36


事件管理​

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_37



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_38



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_39


修改代码实现多个事件同步一个任务

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_40


互斥锁​

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_41



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_42



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_43


消息队列

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_44



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_45



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_46


GPIO-API接口介绍​

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_47



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_开发板_48



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_49

GPIO中断API​

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_50



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_51


PWM输出​

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_52



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_53


ADC采样开发​

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_54



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_55


I2C开发​

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_56



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_57



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_物联网_58


UART读写​

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_59



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_60


华为IOT平台

华为IoT平台

#The Internet of things essay#Little Xiong Pa equipment development of actual combat_ip地址_61



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_62



#The Internet of things essay#Little Xiong Pa equipment development of actual combat_信号量_63


Through the device to butt the huaweiIoTPlatform mainly for the product to create.Then the device registration,Equipment after registration you will generate theclass ID和username,还有password,Then the code in thisclass ID,username,password给替换掉,And then compile the code,A case can realize the wisdom agriculture.


【This article is in iot prize the campaign】,活动链接: ​https://ost.51cto.com/posts/14758​

原网站

版权声明
本文为[51CTO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/221/202208091152355107.html