diff --git a/docs/assets/img/product_pics/unit/unit_example/ANGLE/example_unit_angle_03.png b/docs/assets/img/product_pics/unit/unit_example/ANGLE/example_unit_angle_03.png new file mode 100644 index 00000000..14a73f2e Binary files /dev/null and b/docs/assets/img/product_pics/unit/unit_example/ANGLE/example_unit_angle_03.png differ diff --git a/docs/assets/img/product_pics/unit/unit_example/BUTTON/example_unit_button_03.png b/docs/assets/img/product_pics/unit/unit_example/BUTTON/example_unit_button_03.png index bc90d3e7..b01cc9b8 100644 Binary files a/docs/assets/img/product_pics/unit/unit_example/BUTTON/example_unit_button_03.png and b/docs/assets/img/product_pics/unit/unit_example/BUTTON/example_unit_button_03.png differ diff --git a/docs/assets/img/product_pics/unit/unit_example/IR/example_unit_ir_03.png b/docs/assets/img/product_pics/unit/unit_example/IR/example_unit_ir_03.png new file mode 100644 index 00000000..fc79e718 Binary files /dev/null and b/docs/assets/img/product_pics/unit/unit_example/IR/example_unit_ir_03.png differ diff --git a/docs/assets/img/product_pics/unit/unit_example/NCIR/example_unit_ncir_03.png b/docs/assets/img/product_pics/unit/unit_example/NCIR/example_unit_ncir_03.png new file mode 100644 index 00000000..3c7fe626 Binary files /dev/null and b/docs/assets/img/product_pics/unit/unit_example/NCIR/example_unit_ncir_03.png differ diff --git a/docs/assets/img/product_pics/unit/unit_example/PIR/example_unit_pir_03.png b/docs/assets/img/product_pics/unit/unit_example/PIR/example_unit_pir_03.png new file mode 100644 index 00000000..db5e9162 Binary files /dev/null and b/docs/assets/img/product_pics/unit/unit_example/PIR/example_unit_pir_03.png differ diff --git a/docs/en/unit/angle.md b/docs/en/unit/angle.md index 8de5a88e..980a6382 100644 --- a/docs/en/unit/angle.md +++ b/docs/en/unit/angle.md @@ -49,7 +49,7 @@ cur_sensorValue = analogRead(sensorPin); *If you want the complete code, please click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/ANGLE/UIFlow).* - + ## Schematic diff --git a/docs/en/unit/button.md b/docs/en/unit/button.md index bdc9d2f2..f8d13b73 100644 --- a/docs/en/unit/button.md +++ b/docs/en/unit/button.md @@ -1,4 +1,4 @@ -# Unit BUTTON +# BUTTON @@ -48,7 +48,7 @@ M5.update(); - + diff --git a/docs/en/unit/ir.md b/docs/en/unit/ir.md index 1f9973d4..55ff394e 100644 --- a/docs/en/unit/ir.md +++ b/docs/en/unit/ir.md @@ -57,7 +57,7 @@ cur_recv_value = digitalRead(ir_recv_pin);// read the status of receiver *If you want the complete code, please click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/IR/UIFlow).* - + ## Schematic diff --git a/docs/en/unit/ncir.md b/docs/en/unit/ncir.md index 6e945d84..d134db8f 100644 --- a/docs/en/unit/ncir.md +++ b/docs/en/unit/ncir.md @@ -49,7 +49,7 @@ uint16_t result; float temperature; // initialization -Wire.begin(); +Wire.begin();\ M5.begin(); // read data @@ -62,11 +62,11 @@ result |= Wire.read() << 8;// Receive DATA temperature = result * 0.02 - 273.15; ``` - + ## Schematic diff --git a/docs/en/unit/pir.md b/docs/en/unit/pir.md index b4974353..ba053a54 100644 --- a/docs/en/unit/pir.md +++ b/docs/en/unit/pir.md @@ -46,7 +46,7 @@ M5.update(); If you want the complete code, please click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/PIR/UIFlow). - + ## Schematic diff --git a/docs/ja/unit/angle.md b/docs/ja/unit/angle.md index df8afc38..f3885562 100644 --- a/docs/ja/unit/angle.md +++ b/docs/ja/unit/angle.md @@ -42,7 +42,7 @@ cur_sensorValue = analogRead(sensorPin); *特定のルーチンについてはここをクリックしてください[サンプルコード](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/ANGLE/UIFlow).* - + ## 回路図 diff --git a/docs/ja/unit/button.md b/docs/ja/unit/button.md index e55a948f..555bdfe3 100644 --- a/docs/ja/unit/button.md +++ b/docs/ja/unit/button.md @@ -19,18 +19,38 @@ ### 1. Arduino IDE +*特定のルーチンについてはここをクリックしてください[サンプルコード](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/BUTTON/Arduino)。* + +```arduino +#include + +// declaration +int cur_value = 0; + +// initialization +M5.begin();// init +pinMode(36, INPUT);// BUTTON Pin + +// read data +cur_value = digitalRead(36);// read the value of BUTTON +M5.update(); +``` ### 2. UIFlow +*特定のルーチンについてはここをクリックしてください[サンプルコード](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/BUTTON/UIFlow)。* + + + ## 回路図 - + ### ピンマッピング - +
M5Core(GROVEインターフェースB)GPIO36GPIO265VGND
BUTTON UnitGPIO36GPIO265VGND
BUTTON UnitButton Pin 5VGND
## 関連リンク diff --git a/docs/ja/unit/ir.md b/docs/ja/unit/ir.md index d66d1a7b..6ef281fd 100644 --- a/docs/ja/unit/ir.md +++ b/docs/ja/unit/ir.md @@ -43,7 +43,7 @@ cur_recv_value = digitalRead(ir_recv_pin);// read the status of receiver *特定のルーチンについてはここをクリックしてください[サンプルコード](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/IR/UIFlow).* - + ## 回路図 diff --git a/docs/ja/unit/ncir.md b/docs/ja/unit/ncir.md index ce2b403f..fa7802f1 100644 --- a/docs/ja/unit/ncir.md +++ b/docs/ja/unit/ncir.md @@ -54,6 +54,12 @@ result |= Wire.read() << 8;// Receive DATA temperature = result * 0.02 - 273.15; ``` +### 2. UIFlow + +*特定のルーチンについてはここをクリックしてください[サンプルコード](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/NCIR/UIFlow).* + + + ## 回路図 diff --git a/docs/ja/unit/pir.md b/docs/ja/unit/pir.md index 696d6bc7..7f02b5d2 100644 --- a/docs/ja/unit/pir.md +++ b/docs/ja/unit/pir.md @@ -38,7 +38,7 @@ M5.update(); *特定のルーチンについてはここをクリックしてください[サンプルコード](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/PIR/UIFlow).* - + ## 回路図 diff --git a/docs/zh_CN/unit/angle.md b/docs/zh_CN/unit/angle.md index 53a4e261..a498767e 100644 --- a/docs/zh_CN/unit/angle.md +++ b/docs/zh_CN/unit/angle.md @@ -48,7 +48,7 @@ cur_sensorValue = analogRead(sensorPin); *具体例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/ANGLE/UIFlow)。* - + ## 原理图 diff --git a/docs/zh_CN/unit/button.md b/docs/zh_CN/unit/button.md index e1aed582..787874de 100644 --- a/docs/zh_CN/unit/button.md +++ b/docs/zh_CN/unit/button.md @@ -49,7 +49,7 @@ M5.update(); - + diff --git a/docs/zh_CN/unit/ir.md b/docs/zh_CN/unit/ir.md index 80dd14c9..a2d7b8e2 100644 --- a/docs/zh_CN/unit/ir.md +++ b/docs/zh_CN/unit/ir.md @@ -51,7 +51,7 @@ cur_recv_value = digitalRead(ir_recv_pin);// read the status of receiver *具体例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/IR/UIFlow)。* - + ## 原理图 diff --git a/docs/zh_CN/unit/ncir.md b/docs/zh_CN/unit/ncir.md index 0b7b1da4..c5e814f8 100644 --- a/docs/zh_CN/unit/ncir.md +++ b/docs/zh_CN/unit/ncir.md @@ -62,11 +62,11 @@ result |= Wire.read() << 8;// Receive DATA temperature = result * 0.02 - 273.15; ``` - + ## 原理图 diff --git a/docs/zh_CN/unit/pir.md b/docs/zh_CN/unit/pir.md index 26c590ad..08edeb62 100644 --- a/docs/zh_CN/unit/pir.md +++ b/docs/zh_CN/unit/pir.md @@ -47,7 +47,7 @@ M5.update(); *具体例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/PIR/UIFlow)。* - + ## 原理图