Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
junhuanchen committed May 29, 2019
1 parent d848530 commit f52f84a
Show file tree
Hide file tree
Showing 22 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion source/mPython/docs/classic/clock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@ UI.Clock(x, y, radius)用于构建钟表对象,x、y为OLED显示屏上的起

清除时钟,也就是将显示在OLED显示屏上的时间清除以显示所获取的新时间,否则会导致各个时间值重叠显示在OLED上。

.. image:: /images/classic/analog.jpg
.. image:: ../images/classic/analog.jpg
:scale: 50 %
:align: center
2 changes: 1 addition & 1 deletion source/mPython/docs/extboard/tutorials/parrot_kit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ blue:bit模块
oled.show()
oled.fill(0)

.. image:: /images/tutorials/ext.png
.. image:: ../../images/tutorials/ext.png
:width: 180
:align: center

Expand Down
2 changes: 1 addition & 1 deletion source/mPython/docs/tutorials/advance/filesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ microPython位允许您使用非常简单的文件系统来完成此操作。
它是一种以持久方式存储和组织数据的方法 - 存储在文件系统中的任何数据都应该在设备重启后继续存在。
顾名思义,存储在文件系统中的数据被组织成文件。

.. image:: /images/tutorials/files.jpg
.. image:: ../../images/tutorials/files.jpg

计算机文件是存储在文件系统上的命名数字资源。这些资源包含有用的信息作为数据。
这正是纸质文件的工作原理。它是一种包含有用信息的命名容器。通常,纸质和数字文件都会被命名以指示它们包含的内容。
Expand Down
4 changes: 2 additions & 2 deletions source/mPython/docs/tutorials/advance/i2c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ Master
读取到2字节数据后,还需要根据sht20手册说明,做数据处理转换温度单位,转换公式如下图。


.. figure:: /images/tutorials/sht20_temper.png
.. figure:: ../../images/tutorials/sht20_temper.png
:align: center
:width: 400

SHT20温度转换公式

.. figure:: /images/tutorials/sht20_humidi.png
.. figure:: ../../images/tutorials/sht20_humidi.png
:align: center
:width: 400

Expand Down
4 changes: 2 additions & 2 deletions source/mPython/docs/tutorials/advance/iot/bigiot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
贝壳物联支持多种客户端与设备间通讯,如浏览器、微信小程序公众号、APP(Android)。


.. figure:: /images/tutorials/IoT/bigiot_1.gif
.. figure:: ../../images/tutorials/IoT/bigiot_1.gif
:align: center

浏览器端

.. figure:: /images/tutorials/IoT/bigiot_2.gif
.. figure:: ../../images/tutorials/IoT/bigiot_2.gif
:align: center
:width: 500

Expand Down
6 changes: 3 additions & 3 deletions source/mPython/docs/tutorials/advance/iot/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
能运行的机制。他们可以互相感知和沟通。现在想象一下,无生命的物体是否可以在没有任何人为干预的情况下感知并相互作用。听起来很神奇不是吗?


.. figure:: /images/tutorials/IoT/IoT.png
.. figure:: ../../images/tutorials/IoT/IoT.png
:align: center

what is IoT?
Expand All @@ -38,7 +38,7 @@
目前物联网架构通常分为感知层、网络层和应用层三个层次,也有四层架构、五层架构和七层架构的分法,不过我们这里使用通常使用的三层架构进行说明。图示如下:


.. figure:: /images/tutorials/IoT/three-layer-iot-architecture.png
.. figure:: ../../images/tutorials/IoT/three-layer-iot-architecture.png
:align: center
:width: 400

Expand Down Expand Up @@ -82,7 +82,7 @@



.. figure:: /images/tutorials/IoT/IoT_smarthome.png
.. figure:: ../../images/tutorials/IoT/IoT_smarthome.png
:align: center
:width: 700

Expand Down
16 changes: 8 additions & 8 deletions source/mPython/docs/tutorials/advance/iot/mqtt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MQTT(Message Queue Telemetry Transport),遥测传输协议,提供订阅/
MQTT是一种基于发布 - 订阅的“轻量级”消息传递协议,用于在TCP / IP协议之上使用,它适用于需要“小代码占用”或网络带宽有限的远程位置的连接。
能实现一对多通信(人们称之为发布或订阅型)的协议。它由3 种功能构成,分别是中介(broker)、发布者(publisher)和订阅者(subscriber)

.. figure:: /images/tutorials/IoT/mqtt.png
.. figure:: ../../images/tutorials/IoT/mqtt.png
:align: center
:width: 600

Expand All @@ -19,7 +19,7 @@ MQTT是一种基于发布 - 订阅的“轻量级”消息传递协议,用于
者是负责接收消息的客户端。MQTT 交换的消息都附带“主题”地址,各个客户端把这个“主题”视为收信地址,对其执行传输消息的操作。
形象地比喻一下,中介就是接收邮件的邮箱。

.. figure:: /images/tutorials/IoT/iot_publish.png
.. figure:: ../../images/tutorials/IoT/iot_publish.png
:align: center
:width: 600

Expand All @@ -34,7 +34,7 @@ MQTT是一种基于发布 - 订阅的“轻量级”消息传递协议,用于
对多的关系。在设备和服务器的通信中,设备相当于发布者,服务器则相当于订阅者。


.. figure:: /images/tutorials/IoT/IoT_subscribe.png
.. figure:: ../../images/tutorials/IoT/IoT_subscribe.png
:align: center
:width: 600

Expand Down Expand Up @@ -103,7 +103,7 @@ MQTTClient(client_id, server, port=0, user=None, password=None, keepalive=0), ``
IP地址; ``port`` 参数为mqtt的服务器访问的端口号,一般为1883,不同平台端口会有所不一样;``user`` 参数为用于获取mqtt鉴权的用户名;``password`` 参数为获取mqtt鉴权的password;
``keepalive`` 参数为连接保存时间,当在keepalive间隔时间内未有订阅或发布等包,将会自动断开连接。

.. image:: /images/tutorials/mqtt_1.png
.. image:: ../../images/tutorials/mqtt_1.png
:scale: 60%

发布消息
Expand All @@ -119,9 +119,9 @@ IP地址; ``port`` 参数为mqtt的服务器访问的端口号,一般为1883,

publish后,你可以在Easy IoT工作间的该设备“查看详情”中,查询到刚才发布的消息,如下:

.. image:: /images/tutorials/mqtt_2.png
.. image:: ../../images/tutorials/mqtt_2.png

.. image:: /images/tutorials/mqtt_3.png
.. image:: ../../images/tutorials/mqtt_3.png

订阅主题
-------
Expand Down Expand Up @@ -196,9 +196,9 @@ publish后,你可以在Easy IoT工作间的该设备“查看详情”中,查询

然后点击进入Easy IoT工作间的该设备“发送消息”,发送该主题消息,如下:

.. image:: /images/tutorials/mqtt_4.png
.. image:: ../../images/tutorials/mqtt_4.png

.. image:: /images/tutorials/mqtt_5.gif
.. image:: ../../images/tutorials/mqtt_5.gif
:scale: 50%


Expand Down
10 changes: 5 additions & 5 deletions source/mPython/docs/tutorials/advance/iot/yeelight.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Yeelight 支持Google Assistant 和 Amazon Alexa 智能语音控制。还支持

Yeelight第三方控制协议:https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf

.. figure:: /images/tutorials/yeelight/yeelight_lan.png
.. figure:: ../../images/tutorials/yeelight/yeelight_lan.png
:target: https://www.yeelight.com/zh_CN/developer
:align: center

Expand All @@ -25,15 +25,15 @@ Yeelight第三方控制协议:https://www.yeelight.com/download/Yeelight_Inter

- 首先我们要有个Yeelight智能照明设备,按Yeelight官方声明,市面上在售的所有WiFi照明设备以及后续推出的WiFi产品都会支持局域网控制协议。本人较为推荐Yeelight LED灯泡(彩光版),即经济实惠又能控制颜色。

.. figure:: /images/tutorials/yeelight/yeelight_led.png
.. figure:: ../../images/tutorials/yeelight/yeelight_led.png
:align: center
:scale: 30 %

Yeelight LED灯泡(彩光版)

- YeeLight智能灯泡在使用前,须使用YeeLight APP先配置连接好wifi,并将 "局域网控制" 功能打开。

.. figure:: /images/tutorials/yeelight/yeelight_app.gif
.. figure:: ../../images/tutorials/yeelight/yeelight_app.gif
:align: center
:width: 400

Expand Down Expand Up @@ -116,7 +116,7 @@ Value亮度参数,未提供支持。只需设置 ``hue`` 、``saturation`` 参

还可以使用 ``set_color_temp(degrees)`` 函数设置灯泡色温, ``degrees`` 色温参数,范围1700~6500。

.. figure:: /images/tutorials/yeelight/hsv.png
.. figure:: ../../images/tutorials/yeelight/hsv.png
:align: center
:scale: 70 %

Expand All @@ -125,7 +125,7 @@ Value亮度参数,未提供支持。只需设置 ``hue`` 、``saturation`` 参

------------------------

.. figure:: /images/tutorials/yeelight/yeelight_show.gif
.. figure:: ../../images/tutorials/yeelight/yeelight_show.gif
:align: center
:scale: 100 %

Expand Down
4 changes: 2 additions & 2 deletions source/mPython/docs/tutorials/advance/radio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

板子提供2.4G的无线射频通讯,共 13 Channel。可实现一定区域内的简易组网通讯。在相同通道下,成员可接收广播消息。就类似,对讲机一样。在相同频道下,实现通话。

.. figure:: /images/tutorials/radio/radio.png
.. figure:: ../../images/tutorials/radio/radio.png
:align: center
:width: 200

Expand Down Expand Up @@ -37,7 +37,7 @@ mac为网络设备的MAC地址,地址均唯一。如,想做单播应用,可过

基于上面的radio学习,我们可以用板子制作个有趣的电报机!两个板子之间通过无线电和摩斯密码传播,是不是有谍战片的既视感咧!赶紧尝试下吧!

.. figure:: /images/tutorials/radio/telegraph.jpg
.. figure:: ../../images/tutorials/radio/telegraph.jpg
:align: center
:width: 400

Expand Down
2 changes: 1 addition & 1 deletion source/mPython/docs/tutorials/advance/random.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ MicroPython中的随机数其实是一个稳定算法得出的稳定结果序列
oled.show() #显示oled


.. image:: /images/tutorials/snowing.gif
.. image:: ../../images/tutorials/snowing.gif
6 changes: 3 additions & 3 deletions source/mPython/docs/tutorials/basics/accelerometer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Y - 向左和向右倾斜。
* Z - 上下翻转。

.. image:: /images/tutorials/xyz.png
.. image:: ../../images/tutorials/xyz.png
:align: center


Expand Down Expand Up @@ -95,7 +95,7 @@
oled.show()
oled.fill(0)

.. image:: /images/tutorials/gravity.gif
.. image:: ../../images/tutorials/gravity.gif
:align: center
:scale: 100 %

Expand Down Expand Up @@ -156,7 +156,7 @@

假设板子参考水平面为桌面,板子倾斜过程中,Y轴与桌面是平行,其夹角不变(一直是0度),发生变化的是X轴与桌面的夹角以及Z轴与桌面的夹角,而且桌面与X轴Z轴夹角变化度数是一样的。为了方便分析,我们从Y轴的方向俯看下去,那么这个问题就会简化成只有X轴和Z轴的二维关系。假设某一时刻板子处于如下状态:

.. image:: /images/tutorials/xgraph.png
.. image:: ../../images/tutorials/xgraph.png
:align: center


Expand Down
2 changes: 1 addition & 1 deletion source/mPython/docs/tutorials/basics/buttons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ button_a.irq(trigger=Pin.IRQ_FALLING, handler=ledon) 是调用的中断处理程

当按下按键时为低电平(0),否则高电平(1),在按键按下的过程中,从高电平(1)变为低电平(0)的那一瞬间叫作下降沿,从低电平(0)变为高电平(1)的那一瞬间叫作上升沿。

.. image:: /images/tutorials/falling.png
.. image:: ../../images/tutorials/falling.png
:align: center

4 changes: 2 additions & 2 deletions source/mPython/docs/tutorials/basics/io/analog_io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ EXT连接是板子的P3引脚::
oled.show()
oled.fill(0)

.. image:: /images/tutorials/ext.png
.. image:: ../../images/tutorials/ext.png
:width: 180
:align: center

Expand Down Expand Up @@ -101,7 +101,7 @@ EXT连接是板子的P3引脚::
* 由于IO引脚电压为3.3V,我们需要输出电压为2V。因此,映射值是2/3*1023。
* 由于计算出来的为浮点型数,我们还需要使用 ``int()`` 转成整型。

.. image:: /images/tutorials/pwm.png
.. image:: ../../images/tutorials/pwm.png

您可以在上面看到三种不同PWM信号的图表。它们都具有相同的周期(因此具有频率),但它们具有不同的占空比。

Expand Down
2 changes: 1 addition & 1 deletion source/mPython/docs/tutorials/basics/io/digital_io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

上面需要使用到一块面包板、1个LED灯、MicroPython拓展板、杜邦线。LED灯的正极连接至板子的P0引脚,LED负极连接至板子的GND。

.. image:: /images/tutorials/blink.gif
.. image:: ../../images/tutorials/blink.gif

::

Expand Down
8 changes: 4 additions & 4 deletions source/mPython/docs/tutorials/basics/neopixel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ MicroPython板子载3颗WS2812灯珠,WS2812是一种集成了电流控制芯
----------


.. image:: /images/tutorials/glamour.jpg
.. image:: ../../images/tutorials/glamour.jpg
:width: 600
:align: center

Expand Down Expand Up @@ -118,17 +118,17 @@ MicroPython板子载3颗WS2812灯珠,WS2812是一种集成了电流控制芯
rainbow_cycle(np,20)


.. figure:: /images/tutorials/neopixel_control_leds_cycle.png
.. figure:: ../../images/tutorials/neopixel_control_leds_cycle.png
:align: center

cycle循环效果

.. figure:: /images/tutorials/neopixel_control_leds_bounce.png
.. figure:: ../../images/tutorials/neopixel_control_leds_bounce.png
:align: center

bounce弹跳效果

.. figure:: /images/tutorials/neopixel_control_leds_rainbow.png
.. figure:: ../../images/tutorials/neopixel_control_leds_rainbow.png
:align: center

rainbow彩虹效果
Expand Down
4 changes: 2 additions & 2 deletions source/mPython/docs/tutorials/basics/network/http.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ HTTP Server

>>> main()

.. image:: /images/tutorials/http_1.png
.. image:: ../../images/tutorials/http_1.png


手机或笔记本电脑连接相同wifi,使其在同个局域网内。按打印提示或oled屏幕显示ip,使用浏览器访问板子主机IP地址。

.. image:: /images/tutorials/http_2.png
.. image:: ../../images/tutorials/http_2.png


4 changes: 2 additions & 2 deletions source/mPython/docs/tutorials/basics/network/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ http协议采用的是请求/响应模型,浏览器或客户端发出请求,

例如,想从 http://ip-api.com/json/ 这个开放的接口中获取IP地址等信息,我们将地址直接在浏览器输入,可以看到:

.. image:: /images/tutorials/httpjson.png
.. image:: ../../images/tutorials/httpjson.png
:align: center
:scale: 100 %

Expand Down Expand Up @@ -48,7 +48,7 @@ http协议采用的是请求/响应模型,浏览器或客户端发出请求,
oled.DispChar('IP:%s' % ipDict['query'],0,45) #将IP地址信息显示到OLED显示屏上
oled.show()

.. image:: /images/tutorials/json.jpg
.. image:: ../../images/tutorials/json.jpg
:align: center
:scale: 70 %

Expand Down
6 changes: 3 additions & 3 deletions source/mPython/docs/tutorials/basics/network/tcp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TCP通信需要经过创建连接、数据传送、终止连接三个步骤。TC

套接字在工作时将连接的双方分为服务器端和客户端,即C/S模式,TCP通讯原理如下图:

.. figure:: /images/tutorials/tcp原理.png
.. figure:: ../../images/tutorials/tcp原理.png
:scale: 90 %
:align: center

Expand Down Expand Up @@ -107,7 +107,7 @@ TCP Server IP选择手机在该网内的IP地址 ,端口号可设范围0~65535
接收到文本并将文本显示至oled屏上。


.. image:: /images/tutorials/socket_1.gif
.. image:: ../../images/tutorials/socket_1.gif


TCP服务端
Expand Down Expand Up @@ -183,7 +183,7 @@ tcpServer示例:
的IP地址和端口。Connect连接成功后,发送文本,板子接收到文本显示至oled屏并将返回至TCP Client端。您可在手机接收界面看到文本从Client->Server,Server->Client的过程。


.. image:: /images/tutorials/socket_2.gif
.. image:: ../../images/tutorials/socket_2.gif
:scale: 60 %
:align: center

2 changes: 1 addition & 1 deletion source/mPython/docs/tutorials/basics/network/tcpip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ TCP/IP简介

IP协议负责把数据从一台计算机通过网络发送到另一台计算机。数据被分割成一小块一小块,然后通过IP包发送出去。由于互联网链路复杂,两台计算机之间经常有多条线路,因此,路由器就负责决定如何把一个IP包转发出去。IP包的特点是按块发送,途径多个路由,但不保证能到达,也不保证顺序到达。

.. image:: /images/tutorials/tcpip.png
.. image:: ../../images/tutorials/tcpip.png

IP地址实际上是一个32位整数(称为IPv4),以字符串表示的IP地址如192.168.0.1实际上是把32位整数按8位分组后的数字表示,目的是便于阅读。

Expand Down
4 changes: 2 additions & 2 deletions source/mPython/docs/tutorials/basics/network/udp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ UDP的通信过程与TCP相比较更为简单,不需要复制的三次握手

下图讲解服务器与客户端UDP通信連接的交互过程:

.. figure:: /images/tutorials/udp原理.png
.. figure:: ../../images/tutorials/udp原理.png
:scale: 100 %
:align: center

Expand Down Expand Up @@ -70,7 +70,7 @@ UDP客户端的示例:
s.close()
mywifi.disconnectWiFi()
.. image:: /images/tutorials/udpclient.gif
.. image:: ../../images/tutorials/udpclient.gif
:align: center

UDP服务端
Expand Down

0 comments on commit f52f84a

Please sign in to comment.