在microbit上测试最新的WebUSB功能
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">micro:bit上编程功能是<span style="color: black;">经过</span>自带的DAPLink实现。DAPLink是ARM<span style="color: black;">机构</span>推出的一个低成本开源编程器/仿真器,常用于<span style="color: black;">研发</span>ARM芯片。今年DAPlink<span style="color: black;">已然</span>进行了多次改进和升级,<span style="color: black;">日前</span>的版本<span style="color: black;">已然</span>是0246了,而micro:bit上的DAPLink固件<span style="color: black;">非常多</span>还是0241版,版本较低,不支持<span style="color: black;">有些</span>新的功能,例如webusb。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">webusb是一个非常新的东西,它的<span style="color: black;">目的</span>是让usb设备<span style="color: black;">更易</span>的连接到网络,<span style="color: black;">乃至</span><span style="color: black;">能够</span><span style="color: black;">经过</span>浏览器直接<span style="color: black;">掌控</span>。<span style="color: black;">针对</span>micro:bit<span style="color: black;">来讲</span>,以后无需其它软件,<span style="color: black;">运用</span>浏览器就<span style="color: black;">能够</span>完成编程、下载、调试、传输数据和文件等<span style="color: black;">各样</span>功能,<span style="color: black;">能够</span>更好的<span style="color: black;">掌控</span>硬件。虽然<span style="color: black;">此刻</span>micro:bit还不支持<span style="color: black;">运用</span>webusb进行<span style="color: black;">研发</span>,<span style="color: black;">然则</span><span style="color: black;">能够</span>预见<span style="color: black;">火速</span>就会支持这个功能。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/Z8ssCo6dAQI4N2Jb8R5qicq60HcHSqnfNIXQDLo22ryXwpGyWmpiavhnCibKtwnmicDqW51wLff4jrDh9M9AAaZA8g/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">怎么样</span>查看micro:bit上的DAPLink版本号呢?<span style="color: black;">首要</span>将micro:bit<span style="color: black;">经过</span>usb线连接到计算机,计算机就会<span style="color: black;">显现</span>一个MICROBIT磁盘。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/Z8ssCo6dAQI4N2Jb8R5qicq60HcHSqnfNldMBUdg5e0bUTO0OOgmnicPnpypaejEtvCfqQyYKlwXtTl1Ik2D7BJw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这个磁盘<span style="color: black;">包括</span>了两个文件,<span style="color: black;">咱们</span>打开其中的DETAILS.TXT就<span style="color: black;">能够</span>看到版本号和支持的功能了。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/Z8ssCo6dAQI4N2Jb8R5qicq60HcHSqnfNFibOn7vzXdPeHmm9M9qBpx1dAV7mjxOB39aHFic5I6lwekjDJe3bkoTA/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>你的microbit版本较低,就需要升级固件。固件程序<span style="color: black;">能够</span>到社区的<strong style="color: blue;">文档与固件版块</strong>下载。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">升级时,先按住反面的复位键,<span style="color: black;">而后</span>再<span style="color: black;">插进</span>USB,<span style="color: black;">此时</span>会<span style="color: black;">显现</span>一个MAINTENANCE磁盘,将固件文件(HEX文件)复制进去,复制后就完<span style="color: black;">成为了</span>升级,microbit会自动重新连接USB。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">升级后,<span style="color: black;">能够</span>打开microbit磁盘下的DETAILS.TXT文件,比较一下版本号和功能的<span style="color: black;">区别</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/Z8ssCo6dAQJsQqH7nibcJWMDAcAooYWeBhLh44OQ0WdO47icKygSwrz5KPIK1B73pWtlvayuTmPF3cPbo0aeZX8g/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">升级了固件后,<span style="color: black;">咱们</span>就<span style="color: black;">能够</span>测试一下webusb的功能了。<span style="color: black;">运用</span>前,请确定成功升级了新版本固件,并<span style="color: black;">运用</span>V65版本以上的谷歌浏览器(或谷歌内核)。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">首要</span>,用浏览器打开这个测试网址。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">https://armmbed.github.io/dapjs</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">再将microbit连接到计算机。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">点击网页中<span style="color: black;">过程</span>1的 <span style="color: black;"><strong style="color: blue;">Choose</strong></span> 按钮,在弹出的提示框中<span style="color: black;">选取</span>DAPLink CMSIS-DAP设备,<span style="color: black;">而后</span>在点击提示框下方的连接按钮。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/Z8ssCo6dAQJsQqH7nibcJWMDAcAooYWeBe3nIgwMqJBw0uaer9v7Lhw2icvAicrIjfFzdm45BUVeg9Vpicpz0Tvreg/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">稍等<span style="color: black;">稍许</span>,<span style="color: black;">过程</span>2中就会<span style="color: black;">表示</span>出micro:bit,再点击 <span style="color: black;"><strong style="color: blue;">Connect</strong></span> 按钮进行联机。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/Z8ssCo6dAQJsQqH7nibcJWMDAcAooYWeBr64gcBPkKOme8WOwRc3Qnup1CA6VZPu8JR2GQWS9mOryWeRib5bc5mA/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">过程</span>3是<span style="color: black;">经过</span>浏览器下载测试程序,Flash Green程序会在屏幕上显示Green(绿色)这个单词,Flash Red会<span style="color: black;">表示</span>Red(红色)这个单词。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">过程</span>4<span style="color: black;">能够</span><span style="color: black;">掌控</span>程序的运行、暂停、单步、读取寄存器等功能。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">过程</span>5是串口<span style="color: black;">监测</span>功能,<span style="color: black;">能够</span>在Serial Monitor框中输入命令来<span style="color: black;">掌控</span>microbit。输入字母g并回车,<span style="color: black;">能够</span><span style="color: black;">表示</span>Green;输入字母r回车,就<span style="color: black;">表示</span>Red。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">另一</span>,<span style="color: black;">能够</span>参考一下Hori版主<span style="color: black;">供给</span>的<span style="color: black;">另一</span>一个例子“<strong style="color: blue;">从Block毕业!真正的Python编程项目CodeSpace</strong>
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">l”</p><span style="color: black;">http://www.micropython.org.cn/bbs/forum.php?mod=viewthread&tid=1204</span>
外贸论坛是我们的,责任是我们的,荣誉是我们的,成就是我们的,辉煌是我们的。 网站建设seio论坛http://www.fok120.com/
页:
[1]