嵌入式开发必备项:用FreeRTOS+机智云开发智能设备-Arduino中文社区 - Powered by Discuz! Archiver

康康2020 发表于 2021-1-15 14:11

嵌入式开发必备项:用FreeRTOS+机智云开发智能设备

随着物联网的发展,未来的嵌入式产品必然朝着更加智能化、场景多样化、实时性更高等趋势发展,要处理好这些任务时,一个好的RTOS少不了。对于嵌入式开发者来说,了解和学习一个RTOS也是必要项之一,上手简单、及时性和可靠性高的FreeRTOS是最佳选择,和对开发者友好、物联网开发平台机智云配合,刚好满足了我对智能化开发的需求。下面,我将从基础入手,来讲讲使用机智云+STM32F407+ESP8266+freeRTOS的设计,分别定义了GPIO输入输出,PWM输入输出。实现步骤如下:
[*]WIFI模块烧录GAgent。
1.1 在机智云官网上下载固件,下载好的固件如图1-1所示。
https://img-blog.csdnimg.cn/20200307094934962.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
1.2 在乐鑫官网下载ESP8266的烧写工具。其中第一栏选择烧写的固件文件(32位含有combine的文件),并勾选前面的方框,起始地址填0,CrystalFreq选择26M,SPI SPEED选择40MHz,SPI MODE选择DOUT,FLASH SIZE选择32Mbit-C1。如图1-2所示。
https://img-blog.csdnimg.cn/2020030709505367.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
1.3 按照图1-3连接电路。点击烧写软件的START,会出现“等待上电同步”字样,点击KEY1触发后,会显示下载中,知道出现“Finish”字样,表示固件烧写成功。
https://img-blog.csdnimg.cn/20200307095814920.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70

[*]登录开发者账号,创建产品及数据点。
2.1 进入机智云官网,注册登录后进入开发者中心,可以看到如图2-1所示界面。
https://img-blog.csdnimg.cn/20200307100207134.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
2.2 点击创建产品,在创建界面设定好产品名称,选择WIFI/移动网络方案。选择通讯方式为WIFI,数据传输方式为定长。如图2-2所示。
https://img-blog.csdnimg.cn/20200307100324137.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
2.3 创建完成后,点击“数据点”,可以新建不同类型的数据点,如图2-3所示,该处新建了16个不同的数据点。
https://img-blog.csdnimg.cn/20200307100441417.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70

[*]使用机智云串口调试工具配置WIFI模块。
3.1 下载机智云串口调试助手并解压,将WIFI模块与USB转TTL相连(WIFI模块的TX连TTL的RX,RX连TTL的TX,VCC一定得接3.3V),插上计算机USB接口后,打开机智云串口调试助手,选择“模拟V4MCU”,如图3-1所示。
https://img-blog.csdnimg.cn/20200307100600468.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
3.2 进入刚创建机智云产品中,点击“基本信息”后,获取到Product Key和Product Secret,如图3-2-1所示。将Product Key和Product Secret输入机智云串口调试助手,并点击保存,会弹出如图3-2-2的窗口,且右侧会显示我们定义的数据点列表。
https://img-blog.csdnimg.cn/202003071008074.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307100933364.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
3.3 选择好USB转TTL的串口,并点击“打开串口”,WIFI模块会自动询问,如图3-3所示。
https://img-blog.csdnimg.cn/20200307101321243.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
3.4 打开“指令界面”,点击AirLink后,接收界面会出现如图3-4类似的数据,代表WIFI模块完好。
https://img-blog.csdnimg.cn/20200307101841360.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
3.5 进入机智云手机App,注册登录后,点击右上角“+”号,选择“一键配置”,输入手机连接的WIFI的SSID和密码(此时须保证调试的计算机与手机连接的是同一WIFI,且最好使用路由器),点击“下一步”,选择“乐鑫”,点击 “确定”,再次点击机智云串口调试助手指令界面的“AirLink”,再点击手机App上的“我已完成上述操作”,进入“搜索并连接设备”,具体流程如图3-5-1,3-5-2所示。
https://img-blog.csdnimg.cn/20200307102313589.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307102444508.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
3.6 点击搜索到的设备,在手机App上控制数据点,可以看到机智云串口调试助手数据点的值跟随变化(如图3-6-1,3-6-2所示),则代表WIFI模块配置完成。
https://img-blog.csdnimg.cn/20200307103602933.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307105924390.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70

[*]实现WIFI与MCU的通信协议(可使用机智云MCU代码生成),配置Cube mx并生成代码。
4.1 进入机智云网站产品页面,点击MCU开发,硬件方案选择“独立MCU方案”,硬件平台选择“STM32F407x”,并在Product Secret处输入该产品的Product Secret,点击生成代码包,如图4-1所示。
https://img-blog.csdnimg.cn/20200307110246674.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
4.2 稍等片刻待代码包生成,下载并解压,如图4-2所示。
https://img-blog.csdnimg.cn/20200307110343177.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
4.3 由于在该实验中我们使用的是STM32F407VGT6,而机智云生成代码的MCU为STM32F407ZGT6,故我们需要移植一下,首先打开Cube mx新建一个项目,选择STM32F407VG(如图4-3所示),双击创建项目。
https://img-blog.csdnimg.cn/20200307110435864.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
4.4 点击File->Import Project,点击“…”并选择刚才机智云生成的项目文件中的ioc文件(如图4-4-1所示),点击“OK”后,直到出现图4-4-2所示窗口,点击“Close”,表示导入成功,导入后的引脚配置如图4-4-3所示。
https://img-blog.csdnimg.cn/20200307110824508.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307110902483.png
https://img-blog.csdnimg.cn/20200307110947260.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
4.5 首先配置SYS,Timebase Source选择TIM14,如图4-5-1所示。然后配置除了KEY1,KEY2的GPIO(KEY1,KEY2已经自动生成),如图4-5-2所示。
https://img-blog.csdnimg.cn/2020030711104983.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307111134852.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
4.6 配置Timers,TIM2是项目生成时自动配置,所以不用配置,配置TIM4时,将Clock Source选择为Internal Clock。TIM4的Channel 1-Channel 4为PWM输出(如图4-6-1),该实验中配置的引脚为PB6-PB9,在下方的Configuration中的Parameter Settings中配置如图4-6-2所示,其他地方使用默认即可。
https://img-blog.csdnimg.cn/20200307111218156.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307111254634.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
4.7 再配置ADC,勾选IN4-IN7(对应引脚为PA4-PA7),如图4-7-1所示。然后在下方Configuration中DMA Setting,点击“Add”,出现如图4-7-2所示界面,选择ADC1,并配置成如图4-7-3所示, Parameter Settings中配置如图4-7-4所示,其他不用配置,保持默认即可,值得注意的是,该处使用到了TIM8,TIM8的Mode中Clock Source选择为Internal Clock,TIM8的Configuration配置如图4-7-5所示。
https://img-blog.csdnimg.cn/20200307111419130.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307111448106.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307111521407.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307111606860.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307111645623.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
4.8 点击System Core中的NVIC,配置优先级如图4-8-1所示,Code generation配置如图4-8-2所示。
https://img-blog.csdnimg.cn/20200307111906378.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307111939409.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
4.9 点击Middleware中的FREERTOS,interface选择CMSIS_V1(如图4-9-1所示),在下方Tasks and Queues并创建以下6个Task,如图4-9-2所示。
https://img-blog.csdnimg.cn/20200307112020184.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307112057540.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70

[*]编写外设驱动程序,直至手机App能与MCU建立通信,并能控制传感器外设。
5.1 打开keil5,在main.c中找到HAL_TIM_PeriodElapsedCallback函数,将整个函数注释掉,然后在gizwits_product.c文件中同样可以找到同名HAL_TIM_PeriodElapsedCallback函数,将刚才注释函数的函数体内容放入其中,如图5-1-1,5-1-2所示。
https://img-blog.csdnimg.cn/20200307112204394.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307112227545.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
5.2 将main.c中while(1)中内容剪切放入创建的StartGizwitsHandleTask任务中,用于处理数据上行下发,如图5-2-1,5-2-2所示。
https://img-blog.csdnimg.cn/20200307112330458.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307112355362.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
5.3 将StartSysInitTask函数中for循环内容改为vTaskDelete(NULL),如图5-3所示。
https://img-blog.csdnimg.cn/20200307112459476.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
5.4 在gizwits_product.h文件中头文件导入处添加(如图5-4-1所示)“#include“smsis_os.h””,并添加如图5-4-2所示内容。
https://img-blog.csdnimg.cn/20200307112554206.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307112628168.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
5.5 在common.h中创建联合体,如图5-5-1所示,其中高8位用以区别GPIO和PWM,次高8位用来区别引脚,后16为存入数值。在函数gizwitsEventProcess中,for循环外声明联合体(如图5-5-2所示),for循环中switch—case语句中,注释掉if—else判断,对联合体变量赋值,并利用通知将该联合体发送出去,如图5-5-3所示(个例)。
https://img-blog.csdnimg.cn/20200307112807556.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307112841212.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307113030969.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
5.6 在StartGPIO_OutputTask函数中,在for循环外添加如图5-6-1的声明代码,在for循环内,删除原先所有代码,添加如图5-6-2所示代码,本图只举case为1的情况,添加后可对GPIO进行开关操作。
https://img-blog.csdnimg.cn/20200307113123901.png
https://img-blog.csdnimg.cn/20200307113149863.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
5.7 在StartPWM_OutputTask函数中,需要开启PWM通道,并需要先将CCR置为0(在for循环外,如图5-7-1所示),并就通知内容的不同,做不同的动作(在for循环内),添加代码部分如图5-7-2所示。
https://img-blog.csdnimg.cn/20200307113225311.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307113253145.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
5.8 在StartGPIO_InputTask函数中,直接利用HAL_GPIO_ReadPin读取GPIO状态,并存入数据点结构体中,如图5-8-1所示。在StartADC_inputTask函数中,需要先开启DMA,其中adc_result_buf为定义的一个长度为4的数组,添加代码如图5-8-2所示。
https://img-blog.csdnimg.cn/20200307113339245.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/2020030711340786.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
5.9 将main.c中的如下代码剪切(如图5-9-1所示)到StartSysInitTask函数中(如图5-9-2所示)。
https://img-blog.csdnimg.cn/20200307113541872.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307113611335.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70

[*]至此,两类输入/输出代码完成,可以根据不同用途添加代码,在这里我用到了一个LED检测了一下。
6.1 手机上打开机智云App,控制舵机转动和LED亮灭。如下图所示。
https://img-blog.csdnimg.cn/20200307114147418.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307114245294.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70
https://img-blog.csdnimg.cn/20200307114325329.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzUyOTI5Mg==,size_16,color_FFFFFF,t_70


页: [1]
查看完整版本: 嵌入式开发必备项:用FreeRTOS+机智云开发智能设备