fix uiflow doc pic
@@ -1,4 +1,4 @@
|
||||
# remote control
|
||||
# Remote Control
|
||||
__________________________
|
||||
|
||||
#### Function Description
|
||||
@@ -130,7 +130,9 @@ __________________________
|
||||
#### Instructions
|
||||
|
||||
>When the program runs to the Publish release block, the message is released. example:
|
||||
|
||||
>When the A button is pressed, a message is posted (the subject is "RGB" and the content is "open")
|
||||
|
||||
>When the B button is pressed, a message is posted (the subject is "RGB" and the content is "close")
|
||||
|
||||
><img src="/image/MQTT/Publish2.jpg" width="70%">
|
||||
@@ -182,4 +184,47 @@ __________________________
|
||||
>When the B button is pressed, a message is posted (the subject is "RGB", the content is "close"), and the RGB bar is extinguished.
|
||||
|
||||
|
||||
# WiFi
|
||||
__________________________
|
||||
|
||||
#### Function Description
|
||||
|
||||
>Wifi network settings.
|
||||
|
||||
><img src="/image/Network/network.png" width="70%">
|
||||
|
||||
>* __wifi connect__
|
||||
Establish a wifi connection.
|
||||
|
||||
>* __wifi reconnect__
|
||||
If wifi is not connected, reconnect the connection.
|
||||
|
||||
>* __wifi is connect__
|
||||
If wifi access returns true else ruturns false.
|
||||
|
||||
>* __Connect to Wi-Fi SSID PASSWORD__
|
||||
Connect with ssid and password.
|
||||
|
||||
### Instructions
|
||||
|
||||
>Establish a wifi connection with ssid and password.
|
||||
|
||||
><img src="/image/Network/wifi_user.gif" width="70%">
|
||||
|
||||
|
||||
# P2P
|
||||
|
||||
>* __P2P Send To APIKey Msg__
|
||||
Establish a point-to-point connection based on mqtt,Remote with other M5Stack and you should input the APIkey and Message to send.
|
||||
|
||||
>* __P2P Read__
|
||||
Establish a point-to-point connection,Read the Message form other M5Stack
|
||||
|
||||
#### Instructions
|
||||
|
||||
>Establish a point-to-point connection to the remote host and send a message,the other M5Stack.
|
||||
|
||||
><img src="/image/Network/P2PSend_user.gif" width="70%">
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -88,33 +88,82 @@ Specify a random range, each time it is executed, randomly generate an integer i
|
||||
|
||||
|
||||
|
||||
# Introducing a map
|
||||
__________________________
|
||||
#### Function Description
|
||||
|
||||
>Map is another variable container model that can store any type of object.
|
||||
|
||||
><img src="/image/Operation/map.png" width="40%">
|
||||
|
||||
>* __creat map__
|
||||
Create key-value pairs of map.
|
||||
|
||||
>* __map clear__
|
||||
clear key-value.
|
||||
|
||||
>* __map contain key__
|
||||
Confirm if there is a key in map
|
||||
|
||||
>* __get ken in map__
|
||||
Get the value of Specified key.
|
||||
|
||||
>* __in map add key value__
|
||||
Add key-value in map.
|
||||
|
||||
>* __in map set key value__
|
||||
change the value of key in map.
|
||||
|
||||
>* __in map delete key__
|
||||
Delete specified key
|
||||
|
||||
#### Instructions
|
||||
>Add a create map to create an map, add some elements to the map, Specify keywords and values
|
||||
|
||||
><img src="/image/Operation/map_creat_user.gif" width="70%">
|
||||
|
||||
|
||||
# Introducing an array
|
||||
__________________________
|
||||
#### Function Description
|
||||
|
||||
>If the variable is a container, the array is a collection of many containers. We can assign values to any of the variables in the array.
|
||||
|
||||
><img src="/image/Operation/List.png" width="40%">
|
||||
|
||||
>* __length of__
|
||||
Measure the length of the array (ie the number of elements in the array)
|
||||
|
||||
>* __X is empty__
|
||||
Determine whether an array is empty. When it is established, the expression is True, otherwise it is False.
|
||||
|
||||
>* __in list find__
|
||||
Array index, indexed positive or reverse specified element
|
||||
|
||||
>* __create empty list__
|
||||
Add a value to set whether the judgment is true (for example, whether it is odd or even or prime), if it is true, it is True, otherwise it is False.
|
||||
|
||||
>* __create list with__
|
||||
Customize an array
|
||||
|
||||
>* __in list get__
|
||||
Get the index value of an index element
|
||||
|
||||
>* __in list get sub-list from__
|
||||
Intercepting an element from an array as a new array
|
||||
|
||||
>* __icreat list with item repeated times__
|
||||
Create an array and use the element to repeat a certain number of times to fill
|
||||
|
||||
>* __reverse__
|
||||
Array in reverse order
|
||||
|
||||
>* __in list set as__
|
||||
Set an index to the specified value in the array
|
||||
|
||||
>* __make list from text with delimiter__
|
||||
Create an array from text, using a separator
|
||||
|
||||
|
||||
#### Instructions
|
||||
>Add a create list to create an array, add some elements to the array, call iteratively or otherwise
|
||||
@@ -122,4 +171,78 @@ Create an array from text, using a separator
|
||||
><img src="/image/Operation/List_user.gif" width="70%">
|
||||
|
||||
|
||||
# Introducing JSON
|
||||
__________________________
|
||||
#### Function Description
|
||||
|
||||
>JSON (JavaScript Object Notation) is a lightweight data exchange format that is easy for people to read and write.
|
||||
|
||||
><img src="/image/Operation/JSON.png" width="40%">
|
||||
|
||||
>* __dumps to json__
|
||||
Encode Python objects into JSON strings.
|
||||
|
||||
>* __loads json__
|
||||
Decode an encoded JSON string into a Python object.
|
||||
|
||||
|
||||
#### Instructions
|
||||
>Creat a map dumps to json
|
||||
|
||||
><img src="/image/Operation/JSON_dump_user.gif" width="70%">
|
||||
|
||||
|
||||
# Introducing TEXT
|
||||
__________________________
|
||||
#### Function Description
|
||||
|
||||
>Use these blocks for text processing and screen display.
|
||||
|
||||
><img src="/image/Operation/Text.png" width="40%">
|
||||
|
||||
>* __" "__
|
||||
Assign text or String
|
||||
|
||||
>* __to UPPER CASE__
|
||||
Convert text to uppercase or lowercase.
|
||||
|
||||
>* __in text get letter#__
|
||||
Get the specified character from the text.
|
||||
|
||||
>* __count in__
|
||||
Find the number of occurrences of characters.
|
||||
|
||||
>* __is empty__
|
||||
Returns whether it is empty text.
|
||||
|
||||
>* __length of__
|
||||
Return text length.
|
||||
|
||||
>* __print__
|
||||
Print text.
|
||||
|
||||
>* __replace with in__
|
||||
Replace string of text.
|
||||
|
||||
>* __trim spaces from both sides__
|
||||
Remove spaces from both sides.
|
||||
|
||||
>* __Convert to str__
|
||||
Convert other types to strings.
|
||||
|
||||
>* __" "+__
|
||||
String merging.
|
||||
|
||||
>* __decode__
|
||||
Decode the string in the encoding format specified by encoding.
|
||||
|
||||
>* __encode__
|
||||
Encodes the string in the encoding format specified by encoding.
|
||||
|
||||
>* __Reduce to decimal places__
|
||||
Retain the specified number of decimal places.
|
||||
|
||||
#### Instructions
|
||||
>
|
||||
|
||||
><img src="/image/Operation/Text_user.gif" width="70%">
|
||||
@@ -96,3 +96,33 @@ Get the Angular velocity z position
|
||||
>The accelerometer could be used to create a game controlled by tilt or a device that can alert others if an elderly person falls down
|
||||
|
||||
><img src="/image/Hardwares/IMU_user.gif" width="70%">
|
||||
|
||||
|
||||
# POWER
|
||||
__________________________
|
||||
|
||||
#### Feature introduction
|
||||
|
||||
>Set power management charge or get power.
|
||||
|
||||
|
||||
><img src="/image/Hardwares/POWER.png" width="30%">
|
||||
|
||||
>* __isCharging__
|
||||
Return whether it is charging
|
||||
|
||||
>* __isChargeFull__
|
||||
Return whether full battery
|
||||
|
||||
>* __setCharge__
|
||||
Set charging
|
||||
|
||||
>* __get Battery Level__
|
||||
Return battery level
|
||||
|
||||
|
||||
#### Usage
|
||||
|
||||
>If the charge RGB is RED else BLACK
|
||||
|
||||
><img src="/image/Hardwares/Power_user.gif" width="70%">
|
||||
@@ -9,7 +9,7 @@ _________________________________
|
||||
|
||||
>Go to[m5stack.com](http://m5stack.com/)and download the driver for your OS[CP210X driver](http://m5stack.com/download/Driver/CP210x_VCP_Windows.zip)
|
||||
|
||||
><img src="/image/base/downpage.png" width="70%">
|
||||
><img src="/image/base/CP210X_DL.gif" width="70%">
|
||||
|
||||
|
||||
* __Installing the driver__
|
||||
|
||||
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 380 KiB |
|
After Width: | Height: | Size: 4.9 MiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 3.1 MiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 6.2 MiB |
|
After Width: | Height: | Size: 354 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 516 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 6.2 MiB |
|
After Width: | Height: | Size: 376 KiB |
|
Before Width: | Height: | Size: 51 KiB |
@@ -181,5 +181,49 @@ __________________________
|
||||
|
||||
>当按下B按钮时,进行消息发布(主题为"RGB",内容为"close"), RGB bar熄灭
|
||||
|
||||
# WiFi
|
||||
__________________________
|
||||
|
||||
#### 功能说明
|
||||
|
||||
>设置wifi网络
|
||||
|
||||
><img src="/image/Network/network.png" width="70%">
|
||||
|
||||
>* __wifi connect__
|
||||
建立wifi网络
|
||||
|
||||
>* __wifi reconnect__
|
||||
wifi重新连接
|
||||
|
||||
>* __wifi is connect__
|
||||
返回wifi连接状态
|
||||
|
||||
>* __Connect to Wi-Fi SSID PASSWORD__
|
||||
设置SSID和密码
|
||||
|
||||
### 使用方法
|
||||
|
||||
>wifi连接指定的SSID
|
||||
|
||||
><img src="/image/Network/wifi_user.gif" width="70%">
|
||||
|
||||
|
||||
# P2P
|
||||
|
||||
>* __P2P Send To APIKey Msg__
|
||||
通过MQTT服务器验证APIKey发送消息实现点对点远程控制
|
||||
|
||||
>* __P2P Read__
|
||||
读取远程P2P发送的数据
|
||||
|
||||
#### 使用方法
|
||||
|
||||
>建立P2P并发送消息.
|
||||
|
||||
><img src="/image/Network/P2PSend_user.gif" width="70%">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -86,6 +86,40 @@ __________________________
|
||||
><img src="/image/Operation/Random_user.gif" width="70%">
|
||||
|
||||
|
||||
# 字典
|
||||
__________________________
|
||||
#### 功能说明
|
||||
|
||||
>字典是一种可变容器,可以存储任意类型的变量.
|
||||
|
||||
><img src="/image/Operation/map.png" width="40%">
|
||||
|
||||
>* __creat map__
|
||||
建立键值对
|
||||
|
||||
>* __map clear__
|
||||
清空字典
|
||||
|
||||
>* __map contain key__
|
||||
返回是否存在键
|
||||
|
||||
>* __get key in map__
|
||||
返回键的值
|
||||
|
||||
>* __in map add key value__
|
||||
在字典中添加键值对
|
||||
|
||||
>* __in map set key value__
|
||||
在字典中设置键值对
|
||||
|
||||
>* __in map delete key__
|
||||
删除指定的键
|
||||
|
||||
#### 使用方法
|
||||
>创建字典,添加键值对
|
||||
|
||||
><img src="/image/Operation/map_creat_user.gif" width="70%">
|
||||
|
||||
|
||||
# 引入数组
|
||||
__________________________
|
||||
@@ -122,4 +156,78 @@ __________________________
|
||||
><img src="/image/Operation/List_user.gif" width="70%">
|
||||
|
||||
|
||||
# JSON字符串
|
||||
__________________________
|
||||
#### 功能说明
|
||||
|
||||
>JSON 是一种轻量级数据交互格式,方便数据传输与阅读
|
||||
|
||||
><img src="/image/Operation/JSON.png" width="40%">
|
||||
|
||||
>* __dumps to json__
|
||||
将python对象编码为JSON格式
|
||||
|
||||
>* __loads json__
|
||||
将JSON字符串解码为python对象
|
||||
|
||||
|
||||
#### 使用方法
|
||||
>建立字典转成JSON格式
|
||||
|
||||
><img src="/image/Operation/JSON_dump_user.gif" width="70%">
|
||||
|
||||
|
||||
# 文本
|
||||
__________________________
|
||||
#### 功能描述
|
||||
|
||||
>进行相关文本处理或字符串显示
|
||||
|
||||
><img src="/image/Operation/Text.png" width="40%">
|
||||
|
||||
>* __" "__
|
||||
建立文本内容
|
||||
|
||||
>* __to UPPER CASE__
|
||||
将文本内容进行大写或小写转换
|
||||
|
||||
>* __in text get letter#__
|
||||
截取指定的文本内容
|
||||
|
||||
>* __count in__
|
||||
返回文本中指定字符出现的次数
|
||||
|
||||
>* __is empty__
|
||||
返回文本是否为空
|
||||
|
||||
>* __length of__
|
||||
返回文本长度
|
||||
|
||||
>* __print__
|
||||
打印文本
|
||||
|
||||
>* __replace with in__
|
||||
将文本内容进行替换
|
||||
|
||||
>* __trim spaces from both sides__
|
||||
删除字符串两边空格
|
||||
|
||||
>* __Convert to str__
|
||||
将其他格式转为字符串
|
||||
|
||||
>* __" "+__
|
||||
文本合并
|
||||
|
||||
>* __decode__
|
||||
将字符串解码为指定格式
|
||||
|
||||
>* __encode__
|
||||
将字符串编码为指定格式
|
||||
|
||||
>* __Reduce to decimal places__
|
||||
指定小数位数
|
||||
|
||||
#### Instructions
|
||||
>
|
||||
|
||||
><img src="/image/Operation/Text_user.gif" width="70%">
|
||||