diff --git a/docs/assets/img/product_pics/module/module_example/LEGO_PLUS/example_module_lego_pluse_01.png b/docs/assets/img/product_pics/module/module_example/LEGO_PLUS/example_module_lego_plus_01.png similarity index 100% rename from docs/assets/img/product_pics/module/module_example/LEGO_PLUS/example_module_lego_pluse_01.png rename to docs/assets/img/product_pics/module/module_example/LEGO_PLUS/example_module_lego_plus_01.png diff --git a/docs/assets/img/product_pics/module/module_example/LEGO_PLUS/example_module_lego_pluse_02.png b/docs/assets/img/product_pics/module/module_example/LEGO_PLUS/example_module_lego_plus_02.png similarity index 100% rename from docs/assets/img/product_pics/module/module_example/LEGO_PLUS/example_module_lego_pluse_02.png rename to docs/assets/img/product_pics/module/module_example/LEGO_PLUS/example_module_lego_plus_02.png diff --git a/docs/index.md b/docs/index.md index 3919425f..e721bc7e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -28,7 +28,9 @@ [![module_lora.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_lora_01.png)](en/module/lora)         [![module_lorawan.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_lorawan_01.png)](en/module/lorawan)         [![module_sim800.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_sim800_01.png)](en/module/sim800) -[![module_commu.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_commu_01.png)](en/module/commu)         [![module_usb.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_usb_01.png)](en/module/usb) +[![module_commu.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_commu_01.png)](en/module/commu)          + + diff --git a/docs/ja/README.md b/docs/ja/README.md index 20e9cfd0..22be1cd1 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -28,7 +28,9 @@ [![module_gps.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_gps_01.png)](ja/module/gps)         [![module_lora.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_lora_01.png)](ja/module/lora)         [![module_lorawan.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_lorawan_01.png)](ja/module/lorawan)         [![module_sim800.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_sim800_01.png)](ja/module/sim800) -[![module_commu.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_commu_01.png)](ja/module/commu)         [![module_usb.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_usb_01.png)](ja/module/usb) +[![module_commu.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_commu_01.png)](ja/module/commu)          + + diff --git a/docs/zh_CN/base/lan_base.md b/docs/zh_CN/base/lan_base.md index 833d0bb0..d797f2f4 100644 --- a/docs/zh_CN/base/lan_base.md +++ b/docs/zh_CN/base/lan_base.md @@ -4,7 +4,9 @@ *** -:memo:**[描述](#描述)**      :octocat:**[例程](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Base/LAN/Arduino)**      :electric_plug:**[原理图](#原理图)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.10.6c24425eKdAPr3&id=574863427657)** +:memo:**[描述](#描述)**      :octocat:**[例程](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Base/LAN/Arduino)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.10.6c24425eKdAPr3&id=574863427657)** + + ## 描述 @@ -46,4 +48,4 @@ - **[官方论坛](http://forum.m5stack.com/)** -## 原理图 + diff --git a/docs/zh_CN/module/battery.md b/docs/zh_CN/module/battery.md index 45e71c47..703c4b01 100644 --- a/docs/zh_CN/module/battery.md +++ b/docs/zh_CN/module/battery.md @@ -4,11 +4,13 @@ *** -:memo:**[描述](#描述)**      :electric_plug:**[原理图](#原理图)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.5-c.w4002-1172588093.64.501375f4xEgd84&id=562045689464)** +:memo:**[描述](#描述)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.5-c.w4002-1172588093.64.501375f4xEgd84&id=562045689464)** + + # 描述 -BATTERY模块是一款850mAh的高容量电池模块。当M5Core堆叠了这个电池模块之后,可以做成移动的设备,不再需要USB线一直供电。 +BATTERY模块是一款**850mAh**的高容量电池模块。当M5Core堆叠了这个电池模块之后,可以做成移动的设备,不再需要USB线一直供电。 # 特性 @@ -24,4 +26,4 @@ BATTERY模块是一款850mAh的高容量电池模块。当M5Core堆叠了这个 - **[官方论坛](http://forum.m5stack.com/)** -## 原理图 + diff --git a/docs/zh_CN/module/lego_plus.md b/docs/zh_CN/module/lego_plus.md index 29236dc5..af1455bf 100644 --- a/docs/zh_CN/module/lego_plus.md +++ b/docs/zh_CN/module/lego_plus.md @@ -27,6 +27,18 @@ - **[官方论坛](http://forum.m5stack.com/)** + + ## 例程 -## 原理图 +### 1. Arduino IDE + + + +### 2. UIFlow + + + +具体例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/LEGO_PLUS/UIFlow)。 + + diff --git a/docs/zh_CN/module/plus.md b/docs/zh_CN/module/plus.md index fc32f8bd..6248416d 100644 --- a/docs/zh_CN/module/plus.md +++ b/docs/zh_CN/module/plus.md @@ -4,7 +4,9 @@ *** -:memo:**[描述](#描述)**      :octocat:**[例程](#原理图)**      :electric_plug:**[原理图](#原理图)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.11.6e32425el3pHvc&id=579821616764)** +:memo:**[描述](#描述)**      :octocat:**[例程](#例程)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.11.6e32425el3pHvc&id=579821616764)** + + ## 描述 @@ -31,23 +33,48 @@ ### 1. Arduino IDE +*以下仅为用法示意,并不完整。如果需要完整例程`plus_read_encoder.ino`请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/PLUS/Arduino)。* + + ```arduino /* -* 读取齿轮电位器的数据 +* 读取齿轮电位器的数据和发送红外光线 */ -Wire.requestFrom(0x62, 2); +#include +#include -if(Wire.available()) { - encode = Wire.read();//read value of encoder - if(press_n == 0xff) { - pressed = 0;//button released - } - else { - pressed = 1;//button pressed +#define IrPin 13 +#define PLUS_ADDR 0x62 + +void setup() { + M5.begin(true, false, false); + Wire.begin(); + ledcSetup(1, 38000, 10); + ledcAttachPin(IrPin, 1); +} + +void plus_encode() { + Wire.requestFrom(PLUS_ADDR, 2); + while(Wire.available()) { + int8_t encode = Wire.read(); + uint8_t press_n = Wire.read(); + number += encode; + if(press_n == 0xff) { + press = 0; + } + else { + press = 1; + } } } + +void loop() { + char data[20]; + + plus_encode(); + ledcWrite(1, ledcRead(1) ? 0 : 512); + sprintf(data, "%d %d ", number, press); +} ``` -具体例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/PLUS/Arduino)。 - -## 原理图 + diff --git a/docs/zh_CN/module/servo.md b/docs/zh_CN/module/servo.md index 1e0f112f..39952395 100644 --- a/docs/zh_CN/module/servo.md +++ b/docs/zh_CN/module/servo.md @@ -76,5 +76,4 @@ void loop() { ``` - -## 原理图 \ No newline at end of file + \ No newline at end of file diff --git a/docs/zh_CN/unit/joystick.md b/docs/zh_CN/unit/joystick.md index c194e0ab..748ed139 100644 --- a/docs/zh_CN/unit/joystick.md +++ b/docs/zh_CN/unit/joystick.md @@ -34,6 +34,8 @@ Joystick Unit同样也是与M5Core相连之后,通过PORT A(I2C)控制,其I2 ### 1. Arduino IDE +*例程完整* + ```arduino #include #include "Wire.h"