diff --git a/docs/en/library/mPython/mpython.rst b/docs/en/library/mPython/mpython.rst index e578a3e..f972770 100644 --- a/docs/en/library/mPython/mpython.rst +++ b/docs/en/library/mPython/mpython.rst @@ -671,7 +671,7 @@ Connect WiFi network - ``ssid`` -WiFi network ID - ``password`` -WiFi Password - - ``tiemout`` - Link timeout, default 10 seconds + - ``timeout`` - Link timeout, default 10 seconds .. method:: wifi.disconnectWiFi() diff --git a/docs/en/library/micropython/ntptime.rst b/docs/en/library/micropython/ntptime.rst index 8641291..f300dee 100644 --- a/docs/en/library/micropython/ntptime.rst +++ b/docs/en/library/micropython/ntptime.rst @@ -10,18 +10,13 @@ This module is used for time synchronization, providing accurate time, Internati .. admonition:: what is NTP Network Time Protocol (NTP) is a protocol used to synchronize the time of the computer. It can synchronize the computer to its server or clock source (such as quartz clock, GPS, etc.). It can provide highly precise time calibration. +Note: There's currently no timezone support in MicroPython, and the RTC is set in UTC time. + Method ------ - -.. method:: settime(timezone=8,server = 'ntp.ntsc.ac.cn') - -Synchronize local time - - - ``timezone`` - Time zone time difference, the default is East Eight District, compensation 8 hours - - ``server`` - You can specify the time server yourself, server is a string type. The default time server is "ntp.ntsc.ac.cn" . - +.. method:: settime() Example:: @@ -30,17 +25,14 @@ Example:: mywifi=wifi() mywifi.connectWiFi('tang','tang123456') - - print("Local time before synchronization:%s" %str(time.localtime())) + ntptime.host = 'ntp.ntsc.ac.cn' + ntptime.timeout = 1 ntptime.settime() - print("Local time after synchronization:%s" %str(time.localtime())) + print("Success) 运行结果:: Connecting to network... WiFi Connection Successful,Network Config:('172.20.10.4', '255.255.255.240', '172.20.10.1', '172.20.10.1') - Local time before synchronization:(2000, 1, 1, 0, 40, 8, 5, 1) - Local time after synchronization:(2018, 12, 27, 12, 10, 7, 3, 361) - MicroPython v1.0.1-dirty on 2018-11-23; mPython with ESP32 - Type "help()" for more information. - >>> + Success + diff --git a/docs/zh_CN/library/mPython/mpython.rst b/docs/zh_CN/library/mPython/mpython.rst index 2d57dae..8f84126 100644 --- a/docs/zh_CN/library/mPython/mpython.rst +++ b/docs/zh_CN/library/mPython/mpython.rst @@ -5,7 +5,7 @@ :synopsis: 掌控板板载相关功能函数 :mod:`mpython` --- 掌控板板载相关功能函数 -========================== +========================================= ``mpython`` 是基于掌控板封装的专有模块,内含掌控板板载资源相关功能函数。 详细代码实现可查阅 :ref:`mpython.py源码 ` 。 @@ -63,7 +63,7 @@ .. method:: sound.read() -读取板载麦克风,范围0~4095。 +读取板载麦克风,范围0~4095。(测试测量最大值在2600~3000) 加速度计 @@ -737,7 +737,7 @@ wifi类 - ``ssid`` -WiFi网络名称 - ``password`` -WiFi密码 - - ``tiemout`` -链接超时,默认10秒 + - ``timeout`` -链接超时,默认10秒 .. method:: wifi.disconnectWiFi() diff --git a/docs/zh_CN/tutorials/basics/sound.rst b/docs/zh_CN/tutorials/basics/sound.rst index e64db60..808d0f1 100644 --- a/docs/zh_CN/tutorials/basics/sound.rst +++ b/docs/zh_CN/tutorials/basics/sound.rst @@ -28,7 +28,7 @@ .. Note:: - 麦克风使用 ``read()`` 函数来读取数据。返回的值为12bit的ADC采样数据,即最大值为十进制4095。 + 麦克风使用 ``read()`` 函数来读取数据。返回的值为12bit的ADC采样数据,即最大值为十进制4095。(测试测量最大值在2600~3000) 学会了如何收集周边环境的声音数据,我们可以结合其他功能做更多有趣的场景。