尹小舟 发表于 2024-10-6 13:23

【Follow me第二季第2期】Arduino 基本任务 和 基于ArduinoHA SHT40数据上传HA

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;3060-1621846615933&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h1&quot;,&quot;style&quot;:{}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;p5PQ-1621846617594&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;1.Arduino UNO R4 WiFi 分析与介绍&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Erkg-1728191988502&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;eSUJ-1728191988500&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;UNO R4 WiFi采用了强大且非常稳健的瑞萨微控制器,该控制器也用于UNO R4 Minima上。瑞萨的微控制器以其高性能和稳健性而闻名,包括其内置的外设。这些外设包括模数转换器、定时器、脉冲宽度调制(PWM)单元、通信接口(例如UART、SPI和I2C)等。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;qOz3-1727358043170&quot;,&quot;name&quot;:&quot;image&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;url&quot;:&quot;https://note.youdao.com/yws/res/9822/WEBRESOURCE9b95444b4852f3c4416e0e45e5aed80e&quot;,&quot;width&quot;:1850,&quot;height&quot;:999,&quot;fromIdentity&quot;:&quot;&quot;},&quot;nodes&quot;:[],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;1MOz-1724829107779&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;level&quot;:&quot;h3&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;W5Qi-1724829107777&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;一、核心规格&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;cCf9-1724829109395&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;TAj9-1724829109412&quot;,&quot;listLevel&quot;:1,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;CAyS-1724829109394&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;处理器:采用Renesas RA4M1(Arm Cortex®-M4)微控制器,运行速度为48MHz,相比UNO R3快3倍。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{&quot;index&quot;:1}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;OBU1-1724829109397&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;TAj9-1724829109412&quot;,&quot;listLevel&quot;:1,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;lcXk-1724829109396&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;存储:SRAM从R3的2kB增加到32kB,闪存从32kB增加到256kB,以适应更复杂的项目需求。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{&quot;index&quot;:2}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;pnzf-1724829109399&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;TAj9-1724829109412&quot;,&quot;listLevel&quot;:1,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;Ps9V-1724829109398&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;工作电压:标准5V,但输入电压支持6V至24V,提供了更大的灵活性。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{&quot;index&quot;:3}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;auiI-1724829109401&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;TAj9-1724829109412&quot;,&quot;listLevel&quot;:1,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;Ix8D-1724829109400&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;编程端口:USB-C接口,方便现代设备的连接。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{&quot;index&quot;:4}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;GQ7P-1724829109415&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;level&quot;:&quot;h3&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;qUHE-1724829109402&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;二、特色功能&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;fRQZ-1724829109405&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;Rts1-1724829109413&quot;,&quot;listLevel&quot;:1,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;WUpW-1724829109404&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;WiFi与蓝牙:内置Espressif S3 WiFi模块,支持WiFi和蓝牙连接,便于开发者创建物联网项目。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{&quot;index&quot;:1}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Qw0E-1724829109407&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;Rts1-1724829109413&quot;,&quot;listLevel&quot;:1,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;TpQZ-1724829109406&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;LED矩阵:板载一个12x8的红色LED矩阵(总共96个点),非常适合用于创意项目中的动画或数据可视化。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{&quot;index&quot;:2}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Iv2v-1724829109409&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;Rts1-1724829109413&quot;,&quot;listLevel&quot;:1,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;Wrvy-1724829109408&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;Qwiic连接器:提供一个行业标准的Qwiic I2C连接器,便于快速连接各种兼容模块,扩展开发板的功能。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{&quot;index&quot;:3}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;G5xJ-1724829109411&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;Rts1-1724829109413&quot;,&quot;listLevel&quot;:1,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;P2ij-1724829109410&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;新外设:包括12位模拟DAC、CAN总线、运算放大器和SWD端口等,增强了开发板的功能和灵活性。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{&quot;index&quot;:4}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;8HEA-1724823370609&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;WtlA-1724823370606&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;硬件探索&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;R52w-1724823378515&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;DGam-1724823378514&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;       供电电路&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;HPax-1724824522349&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;a2Ji-1724824522347&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;主要有3种供电方式&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;0JDS-1724824455232&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;listId&quot;:&quot;gGqv-1724824600376&quot;,&quot;listType&quot;:&quot;unordered&quot;,&quot;listLevel&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;CsM9-1724824455230&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;       &quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]},{&quot;text&quot;:&quot;开发板可以通过VIN引脚供电,支持6-24V的范围。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#37373a&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{&quot;index&quot;:1}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;gVGl-1724824549328&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;listId&quot;:&quot;gGqv-1724824600376&quot;,&quot;listType&quot;:&quot;unordered&quot;,&quot;listLevel&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;rOfy-1724824549326&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;       VIN引脚也连接到直流插孔(圆柱插头连接器)。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#37373a&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]},{&quot;text&quot;:&quot; &quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{&quot;index&quot;:2}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;nMvy-1724824553379&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;listId&quot;:&quot;gGqv-1724824600376&quot;,&quot;listType&quot;:&quot;unordered&quot;,&quot;listLevel&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;hitd-1724824553377&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;       USB  C口供电。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}}]">
<p><span style="font-size:24px;"><strong>项目演示视频</strong></span></p>

<p><a href="https://training.eeworld.com.cn/video/41252" target="_blank">【Follow me第二季第2期】项目演示视频</a></p>

<p>&nbsp;</p>

<p><span style="font-size:24px;">物料展示</span></p>

<p>&nbsp;</p>

<p> &nbsp;&nbsp;&nbsp;</p>

<p>清单</p>

<p>Arduino UNO R4 WiFi</p>

<p>Qwiic缆线-50mm</p>

<p>SHT40温湿度传感器扩展板</p>

<p>10K电阻 * 2</p>

<p>6PIN 排针</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><strong><span style="font-size:22px;">1.Arduino UNO R4 WiFi 分析与介绍</span></strong></p>

<p><span style="font-size:22px;">&nbsp; &nbsp; &nbsp; &nbsp;UNO R4 WiFi采用了强大且非常稳健的瑞萨微控制器,该控制器也用于UNO R4 Minima上。瑞萨的微控制器以其高性能和稳健性而闻名,包括其内置的外设。这些外设包括模数转换器、定时器、脉冲宽度调制(PWM)单元、通信接口(例如UART、SPI和I2C)等。</span></p>

<p><span style="font-size:22px;"> &nbsp;</span></p>

<p><strong><span style="font-size:22px;">1.1、核心规格</span></strong></p>

<ul yne-block-type="list">
        <li><span style="font-size:22px;">处理器:采用Renesas RA4M1(Arm Cortex&reg;-M4)微控制器,运行速度为48MHz,相比UNO R3快3倍。</span></li>
        <li><span style="font-size:22px;">存储:SRAM从R3的2kB增加到32kB,闪存从32kB增加到256kB,以适应更复杂的项目需求。</span></li>
        <li><span style="font-size:22px;">工作电压:标准5V,但输入电压支持6V至24V,提供了更大的灵活性。</span></li>
        <li><span style="font-size:22px;">编程端口:USB-C接口,方便现代设备的连接。</span></li>
</ul>

<p><strong><span style="font-size:22px;">1.2、特色功能</span></strong></p>

<ul yne-block-type="list">
        <li><span style="font-size:22px;">WiFi与蓝牙:内置Espressif S3 WiFi模块,支持WiFi和蓝牙连接,便于开发者创建物联网项目。</span></li>
        <li><span style="font-size:22px;">LED矩阵:板载一个12x8的红色LED矩阵(总共96个点),非常适合用于创意项目中的动画或数据可视化。</span></li>
        <li><span style="font-size:22px;">Qwiic连接器:提供一个行业标准的Qwiic I2C连接器,便于快速连接各种兼容模块,扩展开发板的功能。</span></li>
        <li><span style="font-size:22px;">新外设:包括12位模拟DAC、CAN总线、运算放大器和SWD端口等,增强了开发板的功能和灵活性。</span></li>
</ul>

<p><strong><span style="font-size:22px;">1.3硬件探索</span></strong></p>

<p><span style="font-size:22px;">供电电路</span></p>

<p><span style="font-size:22px;">主要有3种供电方式</span></p>

<ul yne-block-type="list">
        <li><span style="font-size:22px;">开发板可以通过VIN引脚供电,支持6-24V的范围。</span></li>
        <li><span style="font-size:22px;">VIN引脚也连接到直流插孔(圆柱插头连接器)。</span></li>
        <li><span style="font-size:22px;">USB C口供电。</span></li>
</ul>

<p> &nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;dSYN-1724824459428&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;6aez-1724824459426&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;使用ISL8541102 降压型DC-DC芯片 将VIN的电压转换成5V电源,ISL8541102是瑞萨的一个宽输入,能提供1.2A电流能力的同步整流的降压芯片,封装很小,使用圣邦微SGM2205(线性稳压器)提供3.3V电源&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}}]">
<p>使用ISL8541102 降压型DC-DC芯片 将VIN的电压转换成5V电源,ISL8541102是瑞萨的一个宽输入,能提供1.2A电流能力的同步整流的降压芯片,封装很小,使用圣邦微SGM2205(线性稳压器)提供3.3V电源</p>

<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Sakj-1724824699390&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;0Pue-1724824699389&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;USB CONNECTOR     电路&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}}]">
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;USB CONNECTOR 电路</p>

<p>&nbsp;</p>
</article>
</article>

<p> &nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;TYbZ-1724824700823&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;zrej-1724824700822&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;NLASB3157  是一个模拟开关用于切换USB C 是跟ESP32S3连接,还是R7FA4M1AB3CFM。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;7hCR-1724831879532&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;Pk36-1724831879531&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;  综合来看这个板子,应该是用ESP32给瑞萨MCU下载的。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}}]">
<p><span style="font-size:20px;">NLASB3157 是一个模拟开关用于切换USB C 是跟ESP32S3连接,还是R7FA4M1AB3CFM。</span></p>

<p><span style="font-size:20px;">综合来看这个板子,应该是用ESP32给瑞萨MCU下载的。</span></p>
</article>

<p>&nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;uGoU-1724831958961&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h1&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;8s2x-1724831958960&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;2.基本任务&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;2CUp-1728192908675&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h2&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;NsXP-1728192908674&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;2.1&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;}]},{&quot;text&quot;:&quot;入门任务(必做):&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#424242&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;}]},{&quot;text&quot;:&quot;搭建环境并开启第一步Blink / 串口打印Hello EEWorld!&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#333333&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;C5z0-1728193550200&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h3&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;rRqo-1728193550201&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;2.1.1 &quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]},{&quot;text&quot;:&quot;Blink &quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#333333&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;},{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]},{&quot;text&quot;:&quot;LED闪灯&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}]}]">
<p><span style="font-size:20px;"><strong>2.基本任务</strong></span></p>

<p><span style="font-size:20px;"><strong>2.1入门任务(必做):搭建环境并开启第一步Blink / 串口打印Hello EEWorld!</strong></span></p>

<p><span style="font-size:20px;"><strong>2.1.1 Blink LED闪灯</strong></span></p>
</article>

<p><span style="font-size:20px;">使用物料及外设:GPIO,一个板载LED</span></p>

<p>&nbsp;</p>

<p> &nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp; LED 使用的是Arduino 13号引脚。</p>

<p> &nbsp;</p>

<pre>
<code>
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH);// turn the LED on (HIGH is the voltage level)
delay(1000);                      // wait for a second
digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
delay(1000);                      // wait for a second
}</code></pre>

<p>&nbsp;</p>

<p>&nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;HXQH-1724985535673&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;level&quot;:&quot;h3&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;XuDG-1724985535674&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;2.1.2 &quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]},{&quot;text&quot;:&quot;串口打印Hello EEWorld!&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#333333&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;},{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}]}]">
<p><strong>2.1.2 串口打印Hello EEWorld!</strong></p>

<p>使用物料及外设:GPIO,一个板载LED</p>

<p> &nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;&nbsp; &nbsp;</p>

<p>&nbsp;</p>

<pre>
<code>void setup()
{

   Serial.begin(9600);//设置波特率
   Serial.println("Hello EEWorld!\r\n");//提示字符
}

void loop()
{
   delay(5000);
   Serial.println("Hello EEWorld!\r\n");
}</code></pre>

<p>&nbsp;</p>
</article>

<p>&nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;ICNT-1728193122709&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h2&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;YP2O-1728193122708&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;2.2  &quot;,&quot;marks&quot;:[]},{&quot;text&quot;:&quot;基础任务(必做):&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#424242&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;}]},{&quot;text&quot;:&quot;驱动12x8点阵LED;用DAC生成正弦波;用OPAMP放大DAC信号;用ADC采集并且打印数据曲线&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#333333&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;dxcM-1728194195227&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h3&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;Zifw-1728194195228&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;2.2.1&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]},{&quot;text&quot;:&quot;驱动12x8点阵LED&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#333333&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;},{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}]}]">
<p><span style="font-size:20px;"><strong>2.2 基础任务(必做):驱动12x8点阵LED;用DAC生成正弦波;用OPAMP放大DAC信号;用ADC采集并且打印数据曲线</strong></span></p>

<p><span style="font-size:20px;"><strong>2.2.1驱动12x8点阵LED</strong></span></p>
</article>

<p>&nbsp;</p>

<p><span style="font-size:20px;">使用物料及外设:使用板载LED矩阵</span></p>

<p> &nbsp;</p>

<p> &nbsp;</p>

<p> &nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;q4AC-1728194203086&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;PhUB-1728194203084&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;UNO R4 WiFi  板载了一个12*8的红色LED矩阵,&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]},{&quot;text&quot;:&quot;可以通过编程来控制这个矩阵以显示不同的图案、文字或动画。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#05073b&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(253, 253, 254)&quot;},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;Arial&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Vseb-1724831531494&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;jSEb-1724831531492&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;    该矩阵使用Charlieplexing将 96 个 LED 连接到仅 11 个 GPIO 端口(Arduino 表示法中的 D28 到 D38)。这种方式使用了很少的gpio端口就点亮了很多的LED灯, 因为像素由两个反并联连接的 LED 组成,并且像素共享端口。然而,由于人眼速度较慢,快速时间复用可以欺骗大脑看到完整的图像。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;T3Ru-1725006635562&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;style&quot;:{&quot;textAlign&quot;:&quot;left&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;grn1-1725006635561&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;Arduino官方开发了一种工具,可以在浏览器中的 LED 矩阵上渲染的帧和动画。制作完动画之后,可以从工具中导出LED点阵数据。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:18},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;7rmE-1725008082629&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;style&quot;:{&quot;textAlign&quot;:&quot;left&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;inline&quot;,&quot;id&quot;:&quot;QLoF-1725008082621&quot;,&quot;name&quot;:&quot;link&quot;,&quot;data&quot;:{&quot;href&quot;:&quot;https://ledmatrix-editor.arduino.cc/&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;d6WB-1725008082627&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;单击此处&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:18},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;}]}]}]},{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;j1Dy-1725008082628&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;转到 LED 矩阵工具。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:18},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;EpTi-1725008082631&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;style&quot;:{&quot;textAlign&quot;:&quot;left&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;nPWL-1725008082630&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;制作完动画之后,你可以按照前面讨论过的格式,从工具中导出它们。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:18},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;B9rJ-1724831531590&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;cwNu-1724831531588&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;这里可以导出.h 文件&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:18}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;dQFe-1728194501070&quot;,&quot;name&quot;:&quot;image&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;fromIdentity&quot;:&quot;&quot;,&quot;url&quot;:&quot;https://note.youdao.com/yws/res/9910/WEBRESOURCE0e69e338d94c6f5fd44ee1dddd91b1f0&quot;,&quot;width&quot;:1422,&quot;height&quot;:636},&quot;nodes&quot;:[],&quot;state&quot;:{&quot;renderSource&quot;:&quot;https://note.youdao.com/yws/res/9910/WEBRESOURCE0e69e338d94c6f5fd44ee1dddd91b1f0&quot;,&quot;initialSize&quot;:{&quot;width&quot;:1422,&quot;height&quot;:636},&quot;loading&quot;:false}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;nvcq-1724831531787&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;Ah2S-1724831531785&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;6xGx-1724831531884&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;qOjt-1724831531883&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}],&quot;state&quot;:{}}]">
<p><span style="font-size:20px;">&nbsp; &nbsp; &nbsp; &nbsp; UNO R4 WiFi 板载了一个12*8的红色LED矩阵,可以通过编程来控制这个矩阵以显示不同的图案、文字或动画。</span></p>

<p><span style="font-size:20px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;该矩阵使用Charlieplexing将 96 个 LED 连接到仅 11 个 GPIO 端口(Arduino 表示法中的 D28 到 D38)。这种方式使用了很少的gpio端口就点亮了很多的LED灯, 因为像素由两个反并联连接的 LED 组成,并且像素共享端口。然而,由于人眼速度较慢,快速时间复用可以欺骗大脑看到完整的图像。</span></p>

<p><span style="font-size:20px;">Arduino官方开发了一种工具,可以在浏览器中的 LED 矩阵上渲染的帧和动画。制作完动画之后,可以从工具中导出LED点阵数据。</span></p>

<p><span style="font-size:20px;"><a href="https://ledmatrix-editor.arduino.cc/">单击此处</a>转到 LED 矩阵工具。</span></p>

<p><span style="font-size:20px;">制作完动画之后,你可以按照前面讨论过的格式,从工具中导出它们。</span></p>

<p><span style="font-size:20px;">这里可以导出.h 文件</span></p>

<p style="text-align: center;"> &nbsp;</p>
</article>

<p style="text-align: center;"> &nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<pre>
<code>#include "Arduino_LED_Matrix.h"

ArduinoLEDMatrix matrix;

byte frame = {
{ 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0 },
{ 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 },
{ 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0 },
{ 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};

uint32_t animation[] = {

    0x400e015,
    0x400400,
    0x40040000

};

void setup() {
// put your setup code here, to run once:
   Serial.begin(115200);
   matrix.begin();
   matrix.renderBitmap(frame, 8, 12);
   delay(1000);
   delay(1000);
   frame = 1;
   matrix.renderBitmap(frame, 8, 12);
   delay(1000);
   delay(1000);
   matrix.loadFrame(animation);
}

void loop() {
// put your main code here, to run repeatedly:

}</code></pre>

<p>&nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;PGEn-1728194203933&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h3&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;4N6q-1728194203932&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;2.2.2&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]},{&quot;text&quot;:&quot;用DAC生成正弦波&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#333333&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;},{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}]}]">
<p><span style="font-size:20px;"><strong>2.2.2用DAC生成正弦波</strong></span></p>

<p>&nbsp;</p>

<p><span style="font-size:20px;">使用物料及外设:使用板载ADC DAC</span></p>

<p> &nbsp;</p>
</article>

<p>&nbsp;</p>

<p> &nbsp;</p>

<p>&nbsp;</p>

<p><span style="font-size:20px;">Arduino R4可以直接使用wave生成正弦波</span></p>

<p>&nbsp;</p>

<pre>
<code>void setup() {

Serial.begin(500000);//设置波特率
Serial.println("Hello EEWorld!\r\n");//提示字符

wave.sine(freq);
wave.amplitude(0.5);

}

void loop() {

   sensorValue = analogRead(A4);
   Serial.println(sensorValue);
}</code></pre>

<p>&nbsp;</p>

<p>&nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;r1gk-1728194210313&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h3&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;mIm4-1728194210312&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;2.2.3&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]},{&quot;text&quot;:&quot;用OPAMP放大DAC信号&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#333333&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;},{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:20}]}]}]}]">
<p><span style="font-size:20px;"><strong>2.2.3用OPAMP放大DAC信号</strong></span></p>
</article>

<p>&nbsp;</p>

<p><span style="font-size:20px;">使用物料及外设:2个10K电阻,板载放大器,ADC</span></p>

<p> &nbsp;</p>

<p>&nbsp;</p>

<p> &nbsp;</p>

<p>&nbsp;</p>

<pre>
<code>#include "analogWave.h"
#include &lt;OPAMP.h&gt;
analogWave wave(DAC);   // 使用DAC引脚实例化模拟曲线对象wave

float freq = 1;// 设置曲线初始频率

void setup() {
Serial.begin(2000000);// 串口波特率
OPAMP.begin(OPAMP_SPEED_HIGHSPEED); //设置OPAMP
wave.sine(freq);       // 使用模拟曲线对象wave按照初始频率生成正弦波
wave.amplitude(0.5);//设置正弦曲线幅值为0.4
}

void loop() {
printf("%d\n",analogRead(A4)); // 读取DAC输出正弦值
Serial.print(" ");
printf("%d\n",analogRead(A5)); // 读取OPAMP输出正弦值
delay(100);
}</code></pre>

<p>&nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;xfjJ-1728193219652&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h2&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;Sg2C-1728193219651&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;2.3 &quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:22}]},{&quot;text&quot;:&quot;进阶任务(必做):&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#424242&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:22}]},{&quot;text&quot;:&quot;通过Wi-Fi,利用MQTT协议接入到开源的智能家居平台HA(HomeAssistant)&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#333333&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;},{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:22}]}]}]}]">
<p><span style="font-size:20px;"><strong>2.3 进阶任务(必做):通过Wi-Fi,利用MQTT协议接入到开源的智能家居平台HA(HomeAssistant)</strong></span></p>
</article>

<p>&nbsp;</p>

<p> &nbsp;</p>

<p>&nbsp;</p>

<p> &nbsp;</p>

<p>&nbsp;</p>

<pre>
<code>#include &lt;ArduinoHA.h&gt;
#include &lt;Wire.h&gt;
#include "WiFiS3.h"
#include "arduino_secrets.h"


int status= WL_IDLE_STATUS;
unsigned long lastUpdateAt = 0;
int freg=1;//max200 Hz imit by serial print


WiFiClient client;
HADevice device(MQTT_CLIENT_ID);//HADevice device (mac, sizeof (mac));
HAMqtt mqtt(client,device);


void setup() {
Serial.begin(9600);
wifi_and_mqtt_init();
}

void loop() {
   
    mqtt.loop();
    if ((millis() - lastUpdateAt) &gt; 2000) { // update in 2s interval

      lastUpdateAt = millis();
      mqtt.publish(TOPIC_SUBSCRIBE,"Hi HA I'm Arduino UNO R4 WII");
      
    }

}




void wifi_and_mqtt_init()
{
//check for the WiFi module:
////检查WiFi模块:
if(WiFi.status() == WL_NO_MODULE){
    //WiFi模块通信失败
    Serial.println("Communication with WiFi module failed!");
    while(true);
}

String fv = WiFi.firmwareVersion();
if (fv &lt; WIFI_FIRMWARE_LATEST_VERSION){
   Serial.println("Please upqrade the firmware");
}
//attempt to connect to WiFi network:
while(status!=WL_CONNECTED){
    Serial.print("Attempting to connect to sID:");
    Serial.println(SECRET_SSID);
    //Connect to WPA/WPA2 network, change this line if using open or WEp network:
    status =WiFi.begin(SECRET_SSID,SECRET_PASS);
    delay(10000);
}





// mqtt.setDataPrefix("UNO");
if(!mqtt.begin(MQTT_SERVER,MQTT_PORT, MQTT_USERNAME, MQTT_PASSWORD)){
    Serial.print("Failed,rc=");
    Serial.print(mqtt.getState());
    Serial.println("try again in f 5 seconds");
    delay(5000);
}
printWifistatus();
}

void printWifistatus()
{
    Serial.print("SSID:");
    Serial.println(WiFi.SSID());

    IPAddress ip= WiFi.localIP();
    Serial.print("IP Address:");
    Serial.println(ip);

    long rssi = WiFi.RSSI();
    Serial.print("signal strength(RssI):");
    Serial.print(rssi);
    Serial.println("dBm");
}</code></pre>

<p>&nbsp;</p>

<article data-content="[]">&nbsp;</article>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;yaki-1728193297871&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h1&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;FIb7-1728193297870&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;3.扩展任务&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:26}]}]}]}]">
<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;yaki-1728193297871&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h1&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;FIb7-1728193297870&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;3.扩展任务&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:26}]}]}]}]">
<p><span style="font-size:24px;"><strong>3.扩展任务</strong></span></p>
</article>

<p>&nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;WOMm-1724985540903&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h2&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;X7aG-1724985540901&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;3.1 SHT40传感器&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:22}]}]}]}]">
<p><span style="font-size:20px;"><strong>3.1 SHT40传感器</strong></span></p>
</article>
</article>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;WOMm-1724985540903&quot;,&quot;name&quot;:&quot;heading&quot;,&quot;data&quot;:{&quot;level&quot;:&quot;h2&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;X7aG-1724985540901&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;3.1 SHT40传感器&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;SimSun&quot;},{&quot;type&quot;:&quot;bold&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:22}]}]}]}]">
<p style="text-align: center;"> &nbsp;</p>
</article>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Fe5h-1727945607085&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;dG3F-1727945607084&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;SHT40传感器可以连接到&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#05073b&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(253, 253, 254)&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:15},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;Arial&quot;}]},{&quot;text&quot;:&quot;Arduino UNO R4 WiFi &quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:15}]},{&quot;text&quot;:&quot;Qwiic接口上,但需要注意几个关键点,以确保硬件的安全和正确的通信。&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#05073b&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(253, 253, 254)&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:15},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;Arial&quot;}]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;ZFyY-1727946239768&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;qoz8-1728208019070&quot;,&quot;listLevel&quot;:1,&quot;listType&quot;:&quot;ordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;BEvN-1727946239766&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;电压兼容性:&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{&quot;index&quot;:1}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;QkEq-1727946240764&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;yVse-1728208019071&quot;,&quot;listLevel&quot;:2,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;df1D-1727946240763&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;Qwiic接口仅支持3.3V供电。这意味着SHT40传感器和其他通过Qwiic连接器连接的设备都应设计为在3.3V下工作。&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{&quot;index&quot;:1}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;UqgY-1727946240766&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;yVse-1728208019071&quot;,&quot;listLevel&quot;:2,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;hxRq-1727946240765&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;切勿尝试将5V或其他高于3.3V的电压连接到Qwiic接口,因为这可能会损坏您的Arduino R4板或其他连接的组件。&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{&quot;index&quot;:2}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;VRWr-1727946240768&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;qoz8-1728208019070&quot;,&quot;listLevel&quot;:1,&quot;listType&quot;:&quot;ordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;PzEY-1727946240767&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;I2C总线选择:&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{&quot;index&quot;:2}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Fre6-1727946240770&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;D3Lu-1728208019072&quot;,&quot;listLevel&quot;:2,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;e6uX-1727946240769&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;Arduino R4可能具有多个I2C总线。由于Qwiic连接器连接到次级I2C总线(通常标记为IIC0或Wire1),您需要在代码中指定使用&quot;,&quot;marks&quot;:[]},{&quot;text&quot;:&quot;Wire1&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgba(27, 31, 35, 0.05)&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:12},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;Courier New&quot;}]},{&quot;text&quot;:&quot;库来初始化这个特定的I2C总线。&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{&quot;index&quot;:1}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;UK95-1727946240772&quot;,&quot;name&quot;:&quot;list-item&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;listId&quot;:&quot;D3Lu-1728208019072&quot;,&quot;listLevel&quot;:2,&quot;listType&quot;:&quot;unordered&quot;,&quot;style&quot;:{&quot;lineHeight&quot;:&quot;1.7&quot;}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;fFL2-1727946240771&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;使用&quot;,&quot;marks&quot;:[]},{&quot;text&quot;:&quot;Wire1.begin()&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgba(27, 31, 35, 0.05)&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:12},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;Courier New&quot;}]},{&quot;text&quot;:&quot;而不是默认的&quot;,&quot;marks&quot;:[]},{&quot;text&quot;:&quot;Wire.begin()&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgba(27, 31, 35, 0.05)&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:12},{&quot;type&quot;:&quot;fontFamily&quot;,&quot;value&quot;:&quot;Courier New&quot;}]},{&quot;text&quot;:&quot;来初始化I2C通信。&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p><span style="font-size:20px;">SHT40传感器可以连接到Arduino UNO R4 WiFi Qwiic接口上,但需要注意几个关键点,以确保硬件的安全和正确的通信。</span></p>

<ol yne-block-type="list">
        <li><span style="font-size:20px;">电压兼容性:</span></li>
</ol>

<ul yne-block-type="list">
        <li>
        <ul yne-block-type="list">
                <li><span style="font-size:20px;">Qwiic接口仅支持3.3V供电。这意味着SHT40传感器和其他通过Qwiic连接器连接的设备都应设计为在3.3V下工作。</span></li>
                <li><span style="font-size:20px;">切勿尝试将5V或其他高于3.3V的电压连接到Qwiic接口,因为这可能会损坏您的Arduino R4板或其他连接的组件。</span></li>
        </ul>
        </li>
</ul>

<ol start="2" yne-block-type="list">
        <li><span style="font-size:20px;">I2C总线选择:</span></li>
</ol>

<ul yne-block-type="list">
        <li>
        <ul yne-block-type="list">
                <li><span style="font-size:20px;">Arduino R4可能具有多个I2C总线。由于Qwiic连接器连接到次级I2C总线(通常标记为IIC0或Wire1),您需要在代码中指定使用Wire1库来初始化这个特定的I2C总线。</span></li>
                <li><span style="font-size:20px;">使用Wire1.begin()而不是默认的Wire.begin()来初始化I2C通信。</span></li>
        </ul>
        </li>
</ul>
</article>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Oz3b-1727945608589&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;bQsd-1727945608587&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;Wier1在Wier.h 的声明&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p><span style="font-size:20px;">Wier1在Wier.h 的声明</span></p>
</article>

<p>&nbsp;</p>

<pre>
<code>#if WIRE_HOWMANY &gt; 0
extern TwoWire Wire;
#endif
#if WIRE_HOWMANY &gt; 1
extern TwoWire Wire1;
#endif
#if WIRE_HOWMANY &gt; 2
extern TwoWire Wire2;
#endif
#if WIRE_HOWMANY &gt; 3
extern TwoWire Wire3;
#endif</code></pre>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;qPFs-1727945742785&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;v9DD-1727945742783&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;在pins_arduino.h 的引脚定义&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p>在pins_arduino.h 的引脚定义</p>
</article>

<pre>
<code>#define WIRE_HOWMANY      2
#define WIRE_SDA_PIN      18 /* A4 */
#define WIRE_SCL_PIN      19 /* A5 */
#define WIRE1_SDA_PIN   27
#define WIRE1_SCL_PIN   26

static const uint8_t SDA = WIRE_SDA_PIN;
static const uint8_t SCL = WIRE_SCL_PIN;</code></pre>

<p>&nbsp;</p>

<p> &nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p> &nbsp;</p>

<p> &nbsp;</p>

<p>&nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;JyrU-1727954091871&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;YBbf-1727954091869&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;示例代码&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#374146&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:16}]}]}],&quot;state&quot;:{}}]">
<p>示例代码</p>
</article>

<p>&nbsp;</p>

<p> &nbsp;</p>

<p>&nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;bAiv-1727954757856&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;xgaN-1727954757854&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;22行,要改为&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#374146&quot;},{&quot;type&quot;:&quot;backgroundColor&quot;,&quot;value&quot;:&quot;rgb(255, 255, 255)&quot;},{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:16}]},{&quot;text&quot;:&quot; if (! sht4.begin(&amp;Wire1))&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:16}]}]}],&quot;state&quot;:{}}]">
<p>22行,要改为 if (! sht4.begin(&amp;Wire1))</p>

<p>&nbsp;</p>

<p> &nbsp;</p>

<p style="text-align: center;">&nbsp;</p>

<p style="text-align: center;">&nbsp;</p>

<p style="text-align: center;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>

<pre>
<code>/***************************************************
This is an example for the SHT4x Humidity &amp; Temp Sensor

Designed specifically to work with the SHT4x sensor from Adafruit
----&gt; https://www.adafruit.com/products/4885

These sensors use I2C to communicate, 2 pins are required to
interface
****************************************************/

#include "Adafruit_SHT4x.h"

Adafruit_SHT4x sht4 = Adafruit_SHT4x();

void setup() {
Serial.begin(115200);

while (!Serial)
    delay(10);   // will pause Zero, Leonardo, etc until serial console opens

Serial.println("Adafruit SHT4x test");
if (! sht4.begin(&amp;Wire1)) {
    Serial.println("Couldn't find SHT4x");
    while (1) delay(1);
}
Serial.println("Found SHT4x sensor");
Serial.print("Serial number 0x");
Serial.println(sht4.readSerial(), HEX);

// You can have 3 different precisions, higher precision takes longer
sht4.setPrecision(SHT4X_HIGH_PRECISION);
switch (sht4.getPrecision()) {
   case SHT4X_HIGH_PRECISION:
       Serial.println("High precision");
       break;
   case SHT4X_MED_PRECISION:
       Serial.println("Med precision");
       break;
   case SHT4X_LOW_PRECISION:
       Serial.println("Low precision");
       break;
}

// You can have 6 different heater settings
// higher heat and longer times uses more power
// and reads will take longer too!
sht4.setHeater(SHT4X_NO_HEATER);
switch (sht4.getHeater()) {
   case SHT4X_NO_HEATER:
       Serial.println("No heater");
       break;
   case SHT4X_HIGH_HEATER_1S:
       Serial.println("High heat for 1 second");
       break;
   case SHT4X_HIGH_HEATER_100MS:
       Serial.println("High heat for 0.1 second");
       break;
   case SHT4X_MED_HEATER_1S:
       Serial.println("Medium heat for 1 second");
       break;
   case SHT4X_MED_HEATER_100MS:
       Serial.println("Medium heat for 0.1 second");
       break;
   case SHT4X_LOW_HEATER_1S:
       Serial.println("Low heat for 1 second");
       break;
   case SHT4X_LOW_HEATER_100MS:
       Serial.println("Low heat for 0.1 second");
       break;
}

}


void loop() {
sensors_event_t humidity, temp;

uint32_t timestamp = millis();
sht4.getEvent(&amp;humidity, &amp;temp);// populate temp and humidity objects with fresh data
timestamp = millis() - timestamp;

Serial.print("Temperature: "); Serial.print(temp.temperature); Serial.println(" degrees C");
Serial.print("Humidity: "); Serial.print(humidity.relative_humidity); Serial.println("% rH");

Serial.print("Read duration (ms): ");
Serial.println(timestamp);

delay(1000);
}</code></pre>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;78ia-1728208650964&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;mQPI-1728208650963&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;3.2 STH40温湿度数据上传HA&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p>3.2 STH40温湿度数据上传HA</p>

<p style="text-align: center;"> &nbsp;</p>

<p style="text-align: center;"> &nbsp;</p>
</article>

<pre>
<code>#include &lt;ArduinoHA.h&gt;
#include &lt;OPAMP.h&gt;
#include &lt;Wire.h&gt;
#include "WiFiS3.h"
#include "arduino_secrets.h"
#include "Adafruit_SHT4x.h"

sensors_event_t humidity, temp;
Adafruit_SHT4x sht4 = Adafruit_SHT4x();



int status= WL_IDLE_STATUS;
unsigned long lastUpdateAt = 0;
int freg=1;//max200 Hz imit by serial print


WiFiClient client;
HADevice device(MQTT_CLIENT_ID);//HADevice device (mac, sizeof (mac));
HAMqtt mqtt(client,device);

HASensorNumber upSHT40_C_Sensor("SHT40_C");
HASensorNumber upSHT40_RH_Sensor("SHT40_RH");

void setup() {
Serial.begin(9600);

if (! sht4.begin(&amp;Wire1)) {
    Serial.println("Couldn't find SHT4x");
    while (1) delay(1);
}
// You can have 3 different precisions, higher precision takes longer
sht4.setPrecision(SHT4X_HIGH_PRECISION);
switch (sht4.getPrecision()) {
   case SHT4X_HIGH_PRECISION:
       Serial.println("High precision");
       break;
   case SHT4X_MED_PRECISION:
       Serial.println("Med precision");
       break;
   case SHT4X_LOW_PRECISION:
       Serial.println("Low precision");
       break;
}

// You can have 6 different heater settings
// higher heat and longer times uses more power
// and reads will take longer too!
sht4.setHeater(SHT4X_NO_HEATER);
switch (sht4.getHeater()) {
   case SHT4X_NO_HEATER:
       Serial.println("No heater");
       break;
   case SHT4X_HIGH_HEATER_1S:
       Serial.println("High heat for 1 second");
       break;
   case SHT4X_HIGH_HEATER_100MS:
       Serial.println("High heat for 0.1 second");
       break;
   case SHT4X_MED_HEATER_1S:
       Serial.println("Medium heat for 1 second");
       break;
   case SHT4X_MED_HEATER_100MS:
       Serial.println("Medium heat for 0.1 second");
       break;
   case SHT4X_LOW_HEATER_1S:
       Serial.println("Low heat for 1 second");
       break;
   case SHT4X_LOW_HEATER_100MS:
       Serial.println("Low heat for 0.1 second");
       break;
}


wifi_and_mqtt_init();
device.setName("Arduino_SHT40_MY");
device.setSoftwareVersion("1.0.1");

upSHT40_C_Sensor.setIcon("mdi:home");
upSHT40_C_Sensor.setName("SHT40_C");
//upSHT40_C_Sensor.setUnitOfMeasurement("C");


upSHT40_RH_Sensor.setIcon("mdi:home");
upSHT40_RH_Sensor.setName("SHT40_RH");
// upSHT40_RH_Sensor.setUnitOfMeasurement("RH");


}

void loop() {
   

    mqtt.loop();
    if ((millis() - lastUpdateAt) &gt; 2000) { // update in 2s interval

      sht4.getEvent(&amp;humidity, &amp;temp);
      upSHT40_RH_Sensor.setValue(humidity.relative_humidity);
      upSHT40_C_Sensor.setValue(temp.temperature);
      Serial.print("Temperature: "); Serial.print(temp.temperature); Serial.println(" degrees C");
      Serial.print("Humidity: "); Serial.print(humidity.relative_humidity); Serial.println("% rH");
      lastUpdateAt = millis();
      mqtt.publish(TOPIC_SUBSCRIBE,"Hi EMQX I'm Arduino UNO R4 WII");
      // you can reset the sensor as follows:
      // analogSensor.setValue(nullptr);
    }

}




void wifi_and_mqtt_init()
{
//check for the WiFi module:
////检查WiFi模块:
if(WiFi.status() == WL_NO_MODULE){
    //WiFi模块通信失败
    Serial.println("Communication with WiFi module failed!");
    while(true);
}

String fv = WiFi.firmwareVersion();
if (fv &lt; WIFI_FIRMWARE_LATEST_VERSION){
   Serial.println("Please upqrade the firmware");
}
//attempt to connect to WiFi network:
while(status!=WL_CONNECTED){
    Serial.print("Attempting to connect to sID:");
    Serial.println(SECRET_SSID);
    //Connect to WPA/WPA2 network, change this line if using open or WEp network:
    status =WiFi.begin(SECRET_SSID,SECRET_PASS);
    delay(10000);
}





// mqtt.setDataPrefix("UNO");
if(!mqtt.begin(MQTT_SERVER,MQTT_PORT, MQTT_USERNAME, MQTT_PASSWORD)){
    Serial.print("Failed,rc=");
    Serial.print(mqtt.getState());
    Serial.println("try again in f 5 seconds");
    delay(5000);
}
printWifistatus();
}

void printWifistatus()
{
    Serial.print("SSID:");
    Serial.println(WiFi.SSID());

    IPAddress ip= WiFi.localIP();
    Serial.print("IP Address:");
    Serial.println(ip);

    long rssi = WiFi.RSSI();
    Serial.print("signal strength(RssI):");
    Serial.print(rssi);
    Serial.println("dBm");
}
</code></pre>

<p>&nbsp;</p>

<p><span style="font-size:24px;"><strong>4.ArduinoHA讲解补充</strong></span></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size:20px;">&nbsp;&nbsp;&nbsp;ArduinoHA是一个专为Arduino和ESP系列微控制器设计的开源库,其主要功能是实现这些设备与Home Assistant智能家居平台之间的无缝通信。使用MQTT(消息队列遥测传输)协议来完成通讯,MQTT是一种轻量级的、基于发布/订阅模式的消息传输协议,非常适合用于物联网(IoT)场景。</span></p>

<p><span style="font-size:20px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;通过ArduinoHA库,开发者可以轻松地将Arduino或ESP设备集成到Home Assistant生态系统中,实现智能家居设备的智能化控制。这包括但不限于灯光控制、温湿度监测、门窗传感器、安防系统等。</span></p>

<p><span style="font-size:20px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArduinoHA库提供了一系列API函数,用于设备的初始化、MQTT连接管理、设备状态更新以及处理来自Home Assistant的命令等。这些API函数使得开发者能够以简单、直观的方式编写代码,从而实现与Home Assistant的通信。</span></p>

<p><span style="font-size:20px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;此外,ArduinoHA还支持MQTT自动发现功能,这意味着当设备首次连接到MQTT服务器时,它会自动向Home Assistant发送设备信息,从而避免了手动在Home Assistant中添加设备的繁琐过程。</span></p>

<p><span style="font-size:20px;"><strong>使用方法与配置步骤:</strong></span></p>

<p>&nbsp;</p>

<p><span style="font-size:20px;"><strong>1.连接到Home Assistant</strong>:</span></p>

<ul>
        <li><span style="font-size:20px;">连接到WiFi网络。</span></li>
        <li><span style="font-size:20px;">初始化MQTT客户端并连接到MQTT服务器。&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</span></li>
        <li><span style="font-size:20px;">配置并添加设备到MQTT客户端。</span></li>
        <li><span style="font-size:20px;">在loop函数中处理MQTT消息并更新设备状态。</span></li>
</ul>

<p><span style="font-size:20px;"><strong>关键点</strong>:</span></p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;jnWr-1728208651785&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;indent&quot;:0}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;7M7r-1728208651784&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;全局初始化&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;RqVB-1728282669802&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;indent&quot;:0}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;r25e-1728282669801&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;:HADevice 和 HAMqtt 实例需要全局初始化,或者作为另一个全局对象的一部分进行初始化。&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{&quot;index&quot;:2}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;bGxK-1728282669804&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;indent&quot;:0}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;AxY7-1728282669803&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;MQTT连接设置&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{&quot;index&quot;:3}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;1z5i-1728282669806&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;indent&quot;:0}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;E9r5-1728282669805&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;:在Arduino的setup()逻辑结束时,需要调用HAMqtt::begin()方法。这个方法允许您提供MQTT代理(Broker)的IP地址和认证信息(如用户名和密码,如果有的话)。&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{&quot;index&quot;:4}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;hv45-1728282669808&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;indent&quot;:0}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;mL8s-1728282669807&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;MQTT循环处理&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{&quot;index&quot;:5}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;mN5f-1728282669810&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;indent&quot;:0}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;eFTj-1728282669809&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;:HAMqtt::loop()方法需要被周期性地调用(不必在每个循环迭代中都调用)。这个方法负责处理MQTT通信中的接收和发送任务。&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{&quot;index&quot;:6}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;RiT4-1728282669812&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;indent&quot;:0}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;3l5M-1728282669811&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;设备类型初始化&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{&quot;index&quot;:7}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;bHqc-1728282669814&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;indent&quot;:0}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;1AOZ-1728282669813&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;:设备类型(如传感器、开关等)需要在HAMqtt类之后进行初始化。关于如何初始化不同类型的设备,将在后面的文档中详细描述。&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p><span style="font-size:20px;">&nbsp; &nbsp; 全局初始化:</span></p>

<p><span style="font-size:20px;">&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HADevice&nbsp;和&nbsp;HAMqtt&nbsp;实例需要全局初始化,或者作为另一个全局对象的一部分进行初始化。</span></p>

<p><span style="font-size:20px;">&nbsp; &nbsp; MQTT连接设置:</span></p>

<p><span style="font-size:20px;">&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在Arduino的setup()逻辑结束时,需要调用HAMqtt::begin()方法。这个方法允许您提供MQTT代理(Broker)的IP地址和认证信息(如用户名和密码,如果有的话)。</span></p>

<p><span style="font-size:20px;">&nbsp; &nbsp; MQTT循环处理:</span></p>

<p><span style="font-size:20px;">&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HAMqtt::loop()方法需要被周期性地调用(不必在每个循环迭代中都调用)。这个方法负责处理MQTT通信中的接收和发送任务。</span></p>

<p><span style="font-size:20px;">&nbsp; &nbsp; 设备类型初始化:</span></p>

<p><span style="font-size:20px;">&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设备类型(如传感器、开关等)需要在HAMqtt类之后进行初始化。关于如何初始化不同类型的设备,将在后面的文档中详细描述。</span></p>
</article>

<p><span style="font-size:20px;"><strong>2.配置Home Assistant</strong>:</span></p>

<p><span style="font-size:20px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在Home Assistant中,无需手动添加设备,因为ArduinoHA支持MQTT自动发现。设备将自动出现在Home Assistant的设备列表中。</span></p>

<p><span style="font-size:20px;">使用HADevice&nbsp;配置设备信息</span></p>

<p><span style="font-size:20px;"><span style="background-color: rgb(250, 250, 250); color: rgb(56, 58, 66); font-family: &quot;Source Code Pro&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Anonymous Pro&quot;, &quot;Droid Sans Mono&quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HADevice</span>&nbsp;类是一个用于表示将要注册到 Home Assistant 设备注册表中的设备的类。在智能家居自动化系统中,每个设备都会有一个唯一的标识符(ID),以便系统能够区分和控制它们。<span style="background-color: rgb(250, 250, 250); color: rgb(56, 58, 66); font-family: &quot;Source Code Pro&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Anonymous Pro&quot;, &quot;Droid Sans Mono&quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, sans-serif;">HADevice</span>&nbsp;类提供了构造函数来初始化设备对象,并允许设置设备的各种属性,如名称、制造商、型号等。</span></p>

<p><span style="font-size:20px;">使用Device types API来设置实体信息</span></p>

<p> &nbsp;</p>

<p>&nbsp;</p>

<p><span style="font-size:24px;"><strong>代码:</strong></span>&gt;&gt; <span style="font-size:20px;"><a href="https://download.eeworld.com.cn/detail/%E5%B0%B9%E5%B0%8F%E8%88%9F/634553" target="_blank">点击下载代码</a></span></p>

<p>&nbsp;</p>

<p><span style="font-size:24px;"><strong>项目总结</strong></span></p>

<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="font-size:20px;">通过这次Follow me第二季第2期的活动,我有幸接触并深入学习了Arduino uNo R4 WIFI板卡的基本功能,以及HA物联网系统的搭建和ArduinoHA的相关知识。这次活动为我提供了一个宝贵的学习和实践机会,让我能够更深入地理解物联网技术及其在实际应用中的潜力。通过实际操作,成功搭建了一个简单的物联网系统,实现了对智能家居设备的远程控制和监控。学习了ArduinoHA的基本概念和工作原理,了解了其作为Arduino与HA系统之间的桥梁所发挥的重要作用。本次Follow me第二季第2期的活动让我收获颇丰。我不仅学到了许多新知识,还通过实际操作加深了对物联网技术的理解。未来,我将继续深入学习物联网领域的相关知识,不断提高自己的专业技能和实践能力,为未来的项目开发和研究打下坚实的基础。同时,我也期待能够有更多的机会参与类似的活动,与更多的同行交流和学习。</span></p>
</article>
</article>

尹小舟 发表于 2024-11-3 21:46

<p>哈哈,一个评论也没有</p>
页: [1]
查看完整版本: 【Follow me第二季第2期】Arduino 基本任务 和 基于ArduinoHA SHT40数据上传HA