diff --git a/docs/assets/img/product_pics/core/minicore/m5stick/example/example_core_m5stick_02.png b/docs/assets/img/product_pics/core/minicore/m5stick/example/example_core_m5stick_02.png new file mode 100644 index 00000000..d57def01 Binary files /dev/null and b/docs/assets/img/product_pics/core/minicore/m5stick/example/example_core_m5stick_02.png differ diff --git a/docs/assets/img/product_pics/core/minicore/m5stick/example/example_core_m5stick_03.png b/docs/assets/img/product_pics/core/minicore/m5stick/example/example_core_m5stick_03.png new file mode 100644 index 00000000..55d74aaa Binary files /dev/null and b/docs/assets/img/product_pics/core/minicore/m5stick/example/example_core_m5stick_03.png differ diff --git a/docs/assets/img/product_pics/module/module_encoder_01.png b/docs/assets/img/product_pics/module/module_encoder_01.png new file mode 100644 index 00000000..7a5b4faa Binary files /dev/null and b/docs/assets/img/product_pics/module/module_encoder_01.png differ diff --git a/docs/assets/img/product_pics/module/module_encoder_02.png b/docs/assets/img/product_pics/module/module_encoder_02.png new file mode 100644 index 00000000..241aa6ef Binary files /dev/null and b/docs/assets/img/product_pics/module/module_encoder_02.png differ diff --git a/docs/assets/img/product_pics/module/module_joystick_01.png b/docs/assets/img/product_pics/module/module_joystick_01.png new file mode 100644 index 00000000..67011b21 Binary files /dev/null and b/docs/assets/img/product_pics/module/module_joystick_01.png differ diff --git a/docs/assets/img/product_pics/module/module_joystick_02.png b/docs/assets/img/product_pics/module/module_joystick_02.png new file mode 100644 index 00000000..538eaacd Binary files /dev/null and b/docs/assets/img/product_pics/module/module_joystick_02.png differ diff --git a/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_02.png b/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_02.png index 9301673a..2a996c19 100644 Binary files a/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_02.png and b/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_02.png differ diff --git a/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_03.png b/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_03.png index a66a6314..9301673a 100644 Binary files a/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_03.png and b/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_03.png differ diff --git a/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_04.png b/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_04.png index 2a996c19..a66a6314 100644 Binary files a/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_04.png and b/docs/assets/img/product_pics/unit/M5GO_Unit_thermal_04.png differ diff --git a/docs/assets/img/product_pics/unit/heart_sch.JPG b/docs/assets/img/product_pics/unit/heart_sch.JPG new file mode 100644 index 00000000..a2fdcfb1 Binary files /dev/null and b/docs/assets/img/product_pics/unit/heart_sch.JPG differ diff --git a/docs/assets/img/product_pics/unit/rfid_sch.JPG b/docs/assets/img/product_pics/unit/rfid_sch.JPG index 03fba665..fcd35edc 100644 Binary files a/docs/assets/img/product_pics/unit/rfid_sch.JPG and b/docs/assets/img/product_pics/unit/rfid_sch.JPG differ diff --git a/docs/assets/img/product_pics/unit/unit_example/HEART/example_unit_heart_01.png b/docs/assets/img/product_pics/unit/unit_example/HEART/example_unit_heart_01.png new file mode 100644 index 00000000..27c8d3af Binary files /dev/null and b/docs/assets/img/product_pics/unit/unit_example/HEART/example_unit_heart_01.png differ diff --git a/docs/assets/img/product_pics/unit/unit_example/RFID/example_unit_rfid_01.png b/docs/assets/img/product_pics/unit/unit_example/RFID/example_unit_rfid_01.png new file mode 100644 index 00000000..666aacbe Binary files /dev/null and b/docs/assets/img/product_pics/unit/unit_example/RFID/example_unit_rfid_01.png differ diff --git a/docs/assets/img/product_pics/unit/unit_rfid_01.png b/docs/assets/img/product_pics/unit/unit_rfid_01.png new file mode 100644 index 00000000..b5e09e18 Binary files /dev/null and b/docs/assets/img/product_pics/unit/unit_rfid_01.png differ diff --git a/docs/assets/img/product_pics/unit/unit_rfid_02.png b/docs/assets/img/product_pics/unit/unit_rfid_02.png new file mode 100644 index 00000000..1c87b3d5 Binary files /dev/null and b/docs/assets/img/product_pics/unit/unit_rfid_02.png differ diff --git a/docs/assets/img/product_pics/unit/unit_rfid_grove_a.png b/docs/assets/img/product_pics/unit/unit_rfid_grove_a.png new file mode 100644 index 00000000..e3f70275 Binary files /dev/null and b/docs/assets/img/product_pics/unit/unit_rfid_grove_a.png differ diff --git a/docs/assets/img/product_pics/unit/unit_weight_01.png b/docs/assets/img/product_pics/unit/unit_weight_01.png new file mode 100644 index 00000000..abb34290 Binary files /dev/null and b/docs/assets/img/product_pics/unit/unit_weight_01.png differ diff --git a/docs/assets/img/product_pics/unit/unit_weight_02.png b/docs/assets/img/product_pics/unit/unit_weight_02.png new file mode 100644 index 00000000..33b4769a Binary files /dev/null and b/docs/assets/img/product_pics/unit/unit_weight_02.png differ diff --git a/docs/en/module/usb.md b/docs/en/module/usb.md new file mode 100644 index 00000000..e69de29b diff --git a/docs/en/unit/env.md b/docs/en/unit/env.md index 54202a9f..5594f797 100644 --- a/docs/en/unit/env.md +++ b/docs/en/unit/env.md @@ -77,6 +77,6 @@ float pressure = bme.readPressure(); ### PinMap - - + +
M5Core(GROVE A)GPIO22GPIO21
ENV UnitSCLSDA
M5Core(GROVE A)GPIO22GPIO215VGND
ENV UnitSCLSDA5VGND
\ No newline at end of file diff --git a/docs/en/unit/heart.md b/docs/en/unit/heart.md new file mode 100644 index 00000000..874c97ce --- /dev/null +++ b/docs/en/unit/heart.md @@ -0,0 +1,102 @@ +# HEART + + + +*** + +:memo:**[Description](#Description)**      :octocat:**[Example](#Example)**       :electric_plug:**[Schematic](#Schematic)**       🛒**[Purchase](https://pt.aliexpress.com/store/product/M5Stack-Newest-Mini-Heart-Rate-Unit-MAX30100-Module-Sensor-for-Arduino-Low-Power-Heart-Rate-Oxygen/3226069_32960528289.html?spm=a2g03.12010615.8148356.2.770159282aM5qM)** + +## Description + +HEART is a unit integrated **MAX30100**(pulse oximeter chip). The principle is that the amount of oxygen and non-carrying oxygen in the red blood cells can be detected by infrared LED illumination, and the ADC value of the heart rate can be obtained. MAX30100 is built in two light emitting diodes and one light detector. After the unit is connected to the GROVE A port of the M5Core, you only need to put your finger on the MAX30110 module of the unit to read the physiological information. + +## Feature + +- Low noise +- Can output specific blood oxygen value and heart rate value +- GROVE interface, support [Arduino](http://www.arduino.cc) +- Two Lego installation holes + +## Related Link + +- **[Offical Video](https://www.youtube.com/channel/UCozgFVglWYQXbvTmGyS739w)** + +- **[Forum](http://forum.m5stack.com/)** + +- **Datasheet** - [MAX30100](https://datasheets.maximintegrated.com/en/ds/MAX30110.pdf) + +- **[MAX30100lib](https://github.com/oxullo/Arduino-MAX30100)** + +## Example + +### 1. Arduino IDE + +*If you want the code, please click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/HEART/Arduino).* + +```arduino +/* + Install MAX30100lib Library first. + + MAX30100_RawData.ino +*/ +#include +#include "MAX30100.h" + +#define SAMPLING_RATE MAX30100_SAMPRATE_100HZ +#define IR_LED_CURRENT MAX30100_LED_CURR_50MA +#define RED_LED_CURRENT MAX30100_LED_CURR_27_1MA +// set HIGHRES_MODE to true only +// when setting PULSE_WIDTH to MAX30100_SPC_PW_1600US_16BITS +#define PULSE_WIDTH MAX30100_SPC_PW_1600US_16BITS +#define HIGHRES_MODE true + +// new a object +MAX30100 sensor; + +void setup() +{ + Serial.begin(115200); + Serial.print("Initializing MAX30100.."); + if (!sensor.begin()) { + Serial.println("FAILED"); + for(;;); + } else { + Serial.println("SUCCESS"); + } + sensor.setMode(MAX30100_MODE_SPO2_HR); + sensor.setLedsCurrent(IR_LED_CURRENT, RED_LED_CURRENT); + sensor.setLedsPulseWidth(PULSE_WIDTH); + sensor.setSamplingRate(SAMPLING_RATE); + sensor.setHighresModeEnabled(HIGHRES_MODE); +} + +void loop() +{ + uint16_t ir, red; + sensor.update(); + while (sensor.getRawValues(&ir, &red)) { + Serial.print(ir); + Serial.print('\t'); + Serial.println(red); + } +} +``` + + + + + +## Schematic + + + +### PinMap + + + + +
M5Core(GROVE A)GPIO22GPIO215VGND
HEART UnitSCLSDA5VGND
\ No newline at end of file diff --git a/docs/en/unit/rfid.md b/docs/en/unit/rfid.md new file mode 100644 index 00000000..60cc2436 --- /dev/null +++ b/docs/en/unit/rfid.md @@ -0,0 +1,94 @@ +# RFID + + + +*** + +:memo:**[Description](#Description)**      :octocat:**[Example](#Example)**       :electric_plug:**[Schematic](#Schematic)**       🛒**[Purchase](https://pt.aliexpress.com/store/product/M5Stack-Newest-Mini-RFID-Unit-RC522-Module-Sensor-for-Arduino-SPI-Writer-Reader-IC-Card-with/3226069_32963407976.html?spm=a2g03.12010615.8148356.2.29057436VJRuWu)** + +## Description + +RFID is a unit integrated **MFRC522**(which hightly integrates reader/writer IC for contactless communication at 13.56MHz). The unit can realize the function of the card reading device, can identify and record multiple card information, and establish applications such as access control system, punching system, warehouse goods storage and community vehicle access registration. + +The Unit is connected to the M5Core's GROVE A interface via the GROVE line and communicates via IIC with an IIC address of 0x28. + +## Feature + +- IIC data rate: 400 ~ 3400Kbit/s +- Supported protocol: ISO14443A, MIFARE and NTAG +- Operate temperature: -20℃-85℃ +- How long data be saved for: > 10 years +- GROVE interface, support [Arduino](http://www.arduino.cc) +- Two Lego installation holes + +## Related Link + +- **[Offical Video](https://www.youtube.com/channel/UCozgFVglWYQXbvTmGyS739w)** + +- **[Forum](http://forum.m5stack.com/)** + +- **Datasheet** - [MFRC522](https://www.nxp.com/docs/en/data-sheet/MFRC522.pdf) + +## Example + +### 1. Arduino IDE + +*The below code is incomplete(just for usage). If you want the complete code, please click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/RFID/Arduino).* + +After programming the RFID.ino, the IC card or the mobile phone NFC, close to the unit, moves back and forth around the unit, and the UID of the IC card or the RFID chip in the mobile phone will be printed on the screen of the M5Core. + +```arduino +/* + RFID.ino +*/ +#include +#include "MFRC522_I2C.h" +#include + +// 0x28 is i2c address on SDA. Check your address with i2cscanner if not match. +MFRC522 mfrc522(0x28); // Create MFRC522 instance. + +// initialization +M5.begin(); Serial.begin(115200); Wire.begin(); +/* Init MFRC522 */ +mfrc522.PCD_Init(); +/* Show details of PCD - MFRC522 Card Reader details */ +ShowReaderDetails(); + +// get the uid of available card +mfrc522.PICC_IsNewCardPresent();// scan for a new card +mfrc522.PICC_ReadCardSerial();// read data +// a new card is selected. The UID and SAK is saved at mfrc522.uid structor. +for (byte i = 0; i < mfrc522.uid.size; i++) { + Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "); + Serial.print(mfrc522.uid.uidByte[i], HEX); +} + +// other function +void ShowReaderDetails() { + /* Get the MFRC522 software version */ + byte v = mfrc522.PCD_ReadRegister(mfrc522.VersionReg); + if (v == 0x91) Serial.print(F(" = v1.0")); + else if (v == 0x92) Serial.print(F(" = v2.0")); + else Serial.print(F(" (unknown)")); +} +``` + + + + + +## Schematic + + + +### PinMap + + + + +
M5Core(GROVE A)GPIO22GPIO215VGND
RFID UnitSCLSDA5VGND
\ No newline at end of file diff --git a/docs/en/unit/thermal.md b/docs/en/unit/thermal.md index 1372f8c5..f025d59b 100644 --- a/docs/en/unit/thermal.md +++ b/docs/en/unit/thermal.md @@ -1,12 +1,10 @@ # Unit THERMAL - + *** -:memo:**[Description](#Description)**      :electric_plug:**[Schematic](#Schematic)**       🛒**[Purchase](https://www.aliexpress.com/store/product/M5Stack-Official-New-Thermal-Camera-MLX90640-with-GROVE-I2C-Compatible-M5GO-FIRE-ESP32-Kit-Mini-Development/3226069_32918177644.html?spm=2114.12010615.8148356.2.4ad0717733LM7H)** - - +:memo:**[Description](#Description)**      :octocat:**[Example](#Example)**       :electric_plug:**[Schematic](#Schematic)**       🛒**[Purchase](https://www.aliexpress.com/store/product/M5Stack-Official-New-Thermal-Camera-MLX90640-with-GROVE-I2C-Compatible-M5GO-FIRE-ESP32-Kit-Mini-Development/3226069_32918177644.html?spm=2114.12010615.8148356.2.4ad0717733LM7H)** ## Description @@ -38,15 +36,42 @@ The unit communicates with m5core through GROVE A(IIC). And IIC address is 0x33. - **Datasheet** - [MLX90640](https://www.melexis.com/-/media/files/documents/datasheets/mlx90640-datasheet-melexis.pdf) - +## Example - + ## Schematic diff --git a/docs/index.md b/docs/index.md index 34b90b50..3425bfc2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -73,14 +73,12 @@ [![unit_joystick.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_joystick_01.png)](en/unit/joystick)         [![unit_earth.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_earth_01.png)](en/unit/earth)         [![unit_color.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_color_01.png)](en/unit/color)         [![unit_tof.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_tof_01.png)](en/unit/tof) - - [![unit_rgb.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_rgb_01.png)](en/unit/rgb)         [![unit_relay.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_relay_01.png)](en/unit/relay)         [![unit_hub.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_hub_01.png)](en/unit/hub)         [![unit_3.96.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_396port_01.png)](en/unit/396port) -[![unit_proto.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_proto_01.png)](en/unit/proto)         [![unit_gps.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_gps_01.png)](en/unit/gps) +[![unit_proto.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_proto_01.png)](en/unit/proto)         [![unit_gps.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_gps_01.png)](en/unit/gps)         [![unit_rfid.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_rfid_01.png)](en/unit/rfid)         [![unit_heart.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_heart_01.png)](en/unit/heart) *** diff --git a/docs/ja/unit/thermal.md b/docs/ja/unit/thermal.md index 9c82a914..756d4c43 100644 --- a/docs/ja/unit/thermal.md +++ b/docs/ja/unit/thermal.md @@ -1,16 +1,14 @@ # THERMAL ユニット - + *** -:memo:**[概要](#概要)**      :electric_plug:**[回路図](#回路図)**       🛒**[購入リンク](https://www.aliexpress.com/store/product/M5Stack-Official-New-Thermal-Camera-MLX90640-with-GROVE-I2C-Compatible-M5GO-FIRE-ESP32-Kit-Mini-Development/3226069_32918177644.html?spm=2114.12010615.8148356.2.4ad0717733LM7H)** - - +:memo:**[概要](#概要)**      :octocat:**[サンプルコード](#サンプルコード)**       :electric_plug:**[回路図](#回路図)**       🛒**[購入リンク](https://www.aliexpress.com/store/product/M5Stack-Official-New-Thermal-Camera-MLX90640-with-GROVE-I2C-Compatible-M5GO-FIRE-ESP32-Kit-Mini-Development/3226069_32918177644.html?spm=2114.12010615.8148356.2.4ad0717733LM7H)** ## 概要 -**THERMAL**ユニットはサーモパイルセンサー**MLX90640**を備えたサーモグラフィックカメラユニットです。解像度は32x64ピクセルです。遠くの物体の表面温度を±1.5°Cの精度で計測する事が可能です。I2Cで値を取得できます。 +**THERMAL**ユニットはサーモパイルセンサー**MLX90640**を備えたサーモグラフィックカメラユニットです。解像度は32x24ピクセルです。遠くの物体の表面温度を±1.5°Cの精度で計測する事が可能です。I2Cで値を取得できます。(I2Cアドレスは0x33です) ## 特徴 @@ -26,11 +24,42 @@ - サーモグラフィ - ビルのスマート空調システム - +*特定のルーチンについてはここをクリックしてください[サンプルコード](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/THERMAL/Arduino)。* + +```arduino +/* + MLX90640.ino +*/ +#include +#include +#include "MLX90640_API.h" +#include "MLX90640_I2C_Driver.h" + +// declaration +uint16_t eeMLX90640[832];//32 * 24 = 768 +int SetRefreshRate; + +// initialization +/* load system parameter */ +MLX90640_DumpEE(MLX90640_address, eeMLX90640); +/* load extraction parameter */ +MLX90640_ExtractParameters(eeMLX90640, &mlx90640); +SetRefreshRate = MLX90640_SetRefreshRate(0x33, 0x05); +M5.Lcd.fillScreen(TFT_BLACK); +infodisplay(); + +// display heat map +M5.update(); +infodisplay(); +interpolate_image(reversePixels,ROWS,COLS,dest_2d,\ + INTERPOLATED_ROWS,INTERPOLATED_COLS); +``` + + ## 回路図 diff --git a/docs/zh_CN/README.md b/docs/zh_CN/README.md index 48ac88c1..83787e2a 100644 --- a/docs/zh_CN/README.md +++ b/docs/zh_CN/README.md @@ -76,7 +76,7 @@ M5GO物联网开发套件              FACES -[![unit_gps.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_gps_01.png)](zh_CN/unit/gps)         [![unit_proto.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_proto_01.png)](zh_CN/unit/proto) +[![unit_gps.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_gps_01.png)](zh_CN/unit/gps)         [![unit_proto.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_proto_01.png)](zh_CN/unit/proto)         [![unit_rfid.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_rfid_01.png)](zh_CN/unit/rfid)         [![unit_heart.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_heart_01.png)](zh_CN/unit/heart) *** diff --git a/docs/zh_CN/app/lidarbot.md b/docs/zh_CN/app/lidarbot.md index 8aa8219a..20da37eb 100644 --- a/docs/zh_CN/app/lidarbot.md +++ b/docs/zh_CN/app/lidarbot.md @@ -24,11 +24,11 @@ | :-------------: |:------------------------------------: |:---:|:---:| | 控制车轮 | 0xAA,SpeedX(-7 ~ 7),SpeedY,SpeedZ,SpeedA,0x55 | 0xAA, 5, 5, 5, 5, 0x55(前进,速度5) |ControlWheel(5, 5, 5)| | 控制单颗RGB | 0xAB,LedIndex,R(0 ~ 254),G,B,0x55 | 0xAB, 3, 20, 50, 100, 0x55(第三颗灯亮指定颜色)|setLedColor(3, 20, 50, 100)| -| 控制前向RGB灯带 | 0xAC,R(0 ~ 254),G,B,0x55 | 0xAC, 20, 50, 100, 0x55(前向灯带亮指定颜色)|| -| 控制后向RGB灯带 | 0xAD,R(0 ~ 254),G,B,0x55 |0xAD, 20, 50, 100, 0x55(前向灯带亮指定颜色)|| +| 控制前向RGB灯带 | 0xAC,R(0 ~ 254),G,B,0x55 | 0xAC, 20, 50, 100, 0x55(前向灯带亮指定颜色)|setFrontLedBar(20, 50, 100)| +| 控制后向RGB灯带 | 0xAD,R(0 ~ 254),G,B,0x55 |0xAD, 20, 50, 100, 0x55(前向灯带亮指定颜色)|setBackLedBar(20, 50, 100)| | 控制全部RGB | 0xAE,R(0 ~ 254),G,B,0x55 |0xAE, 20, 50, 100, 0x55(全部灯亮指定颜色)|setLedAll(20, 50, 100)| -| 控制舵机0 | 0xAF,Angle(0 ~ 180),0x55 |0xAF, 100, 0x55(舵机0转动100度)|| -| 控制舵机1 | 0xB0,Angle(0 ~ 180),0x55 |0xB0, 100, 0x55(舵机1转动100度)|| +| 控制舵机0 | 0xAF,Angle(0 ~ 180),0x55 |0xAF, 100, 0x55(舵机0转动100度)|setServo0Angle(100)| +| 控制舵机1 | 0xB0,Angle(0 ~ 180),0x55 |0xB0, 100, 0x55(舵机1转动100度)|setServo1Angle(100)| diff --git a/docs/zh_CN/core/m5stick.md b/docs/zh_CN/core/m5stick.md index e6d8005e..2dd106a2 100644 --- a/docs/zh_CN/core/m5stick.md +++ b/docs/zh_CN/core/m5stick.md @@ -10,7 +10,7 @@ **M5Stick** 是一个包含1.3寸OLED屏幕(64x128),LED灯,按键,蜂鸣器,红外发射管和80mA的电池的小型ESP32开发板。你通常可以将它戴在手腕上,也可以利用我们的配件将它固定到墙上。 -M5Stick有两个版本,第一个是无PSRAM的版本,另外一个是有MPU9250的版本,附送一些配件(`WATCH BELT`, `WALL` 和 `BRICK`)。 +M5Stick有两个版本,灰色外壳是无PSRAM的版本,白色外壳是有MPU9250的版本,附送一些配件(`WATCH BELT`, `WALL` 和 `BRICK`)。 ## 特性 diff --git a/docs/zh_CN/module/encoder.md b/docs/zh_CN/module/encoder.md new file mode 100644 index 00000000..4bc12ce9 --- /dev/null +++ b/docs/zh_CN/module/encoder.md @@ -0,0 +1,70 @@ +# ENCODER - 旋转编码 + + + +*** + +:memo:**[描述](#描述)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.11.12b9425efVP5Y2&id=583870225775)** + + + +## 描述 + +ENCODER是一款FACES系列中的旋转编码器模块,需要堆叠了FACES底座和主控M5Core来使用。能输出旋转角度大小,旋钮是否按下这些信息。 + +IIC地址为0X5E + +## 特性 + +- 12颗RGB灯 +- 3.5 mm耳机插孔和麦克风(麦克风位置需要用户自行焊接O欧姆电阻来使能) +- Parameter: +- GSM/GPRS +- 支持频宽:850/900/1800/1900MHz + +## 管脚映射 + +*SIM800与M5Core堆叠之后,它们之间通过UART2通信* + +**SIM800** + +| SIM800 Pin | ESP32 Chip | +| :----------: |:------------: | +| TXD | U2RXD(GPIO16) | +| RXD | U2TXD(GPIO17) | +| RST | GPIO5 | + +## 包含 + +- 1x SIM800L模块 + +## 相关链接 + +- **[官方频道视频](https://i.youku.com/i/UNjE1ODA2MzE0OA==?spm=a2hzp.8253869.0.0)** + +- **[官方论坛](http://forum.m5stack.com/)** + + + + + + + + \ No newline at end of file diff --git a/docs/zh_CN/module/sim800.md b/docs/zh_CN/module/sim800.md index 21391000..fd57e055 100644 --- a/docs/zh_CN/module/sim800.md +++ b/docs/zh_CN/module/sim800.md @@ -12,7 +12,7 @@ SIM800L模块是一款内置了SIM800L GSM/GPRS小模块的M5Stack可堆叠模块堆叠了M5Core之后,你可以用Arduino来编程它。 -SIM800L是完整的支持四种频宽的GSM/GPRS解决方案。通过串口发送AT支持来控制SIM800模块 +SIM800L是完整的支持四种频宽的GSM/GPRS解决方案。通过串口发送AT指令来控制SIM800模块 ## 特性 diff --git a/docs/zh_CN/module/usb.md b/docs/zh_CN/module/usb.md index 4d98d6bf..faa986d5 100644 --- a/docs/zh_CN/module/usb.md +++ b/docs/zh_CN/module/usb.md @@ -35,9 +35,9 @@ ## 例程 -*以下仅为用法示意,并不完整。如果需要完整例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/JOYSTICK/Arduino)。* +*以下仅为用法示意,并不完整。如果需要完整例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/USB/Arduino)。* -烧录例程,USB鼠标接入模块之后,按住左键并拖动鼠标描绘白色线条;按住右键,描述绿色线条;按下中间滚轮键,清屏。 +烧录例程`usb_mouse.ino`,USB鼠标接入模块之后,按住左键并拖动鼠标描绘白色线条;按住右键,描述绿色线条;按下中间滚轮键,清屏。 ```arduino #include diff --git a/docs/zh_CN/quick_start/m5core/m5stack_core_get_started_Arduino_Windows.md b/docs/zh_CN/quick_start/m5core/m5stack_core_get_started_Arduino_Windows.md index d80d42d4..7c748450 100644 --- a/docs/zh_CN/quick_start/m5core/m5stack_core_get_started_Arduino_Windows.md +++ b/docs/zh_CN/quick_start/m5core/m5stack_core_get_started_Arduino_Windows.md @@ -55,6 +55,7 @@ ## 示例 这部分是为了验证现在你是否能通过Arduino IDE对M5Core编程。 + 现在,用USB线连接M5Core和PC,然后打开Arduino IDE,并选择正确的串口号。这个串口号其实就是连接M5Core的串口号,注意不要选错啦。 选择一个example例程,然后上传运行试试。 diff --git a/docs/zh_CN/unit/heart.md b/docs/zh_CN/unit/heart.md index 75520672..4b2b0d54 100644 --- a/docs/zh_CN/unit/heart.md +++ b/docs/zh_CN/unit/heart.md @@ -1,46 +1,96 @@ # HEART - 血氧心率传感器 - + *** -:memo:**[描述](#描述)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.11.7a46425eWmFRNi&id=583999638264)** - - +:memo:**[描述](#描述)**      :octocat:**[例程](#例程)**      :electric_plug:**[原理图](#原理图)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.11.7a46425eWmFRNi&id=583999638264)** ## 描述 -HEART是一款能够非侵入式检测血氧和心率的Unit,集成MAX30110 pulse oximeter模块,其原理是通过红外led灯照射,检测红血球携带氧气和非携带氧气情况数量变化情况,能够得到心率的ADC值,包含两个发光二极管和一个光检测器。unit接入M5Core的GROVE A口之后,只需要将手指紧贴在unit的MAX30110模块上,即可读出生理信息。 +HEART是一款能够非侵入式检测血氧和心率的Unit,集成MAX30110模块,其原理是通过红外led灯照射,检测红血球携带氧气和非携带氧气情况数量变化情况,能够得到心率的ADC值,包含两个发光二极管和一个光检测器。unit接入M5Core的GROVE A口之后,只需要将手指紧贴在unit的MAX30110模块上,即可读出生理信息。 ## 特性 +- 低噪声 +- 能输出具体的血氧值和心率值 - Unit内置两个Lego插件孔,方便与Lego件结合 - - - - - - ## 相关链接 -- [MAX30100](https://datasheets.maximintegrated.com/en/ds/MAX30110.pdf) +- **[官方频道视频](https://i.youku.com/i/UNjE1ODA2MzE0OA==?spm=a2hzp.8253869.0.0)** + +- **[官方论坛](http://forum.m5stack.com/)** + +- **数据手册** - [MAX30100](https://datasheets.maximintegrated.com/en/ds/MAX30110.pdf) + +- **[MAX30100lib](https://github.com/oxullo/Arduino-MAX30100)** + +## 例程 + +### 1. Arduino IDE + +*具体例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/HEART/Arduino)。* + +```arduino +/* + Install MAX30100lib Library first. + + MAX30100_RawData.ino +*/ +#include +#include "MAX30100.h" + +#define SAMPLING_RATE MAX30100_SAMPRATE_100HZ +#define IR_LED_CURRENT MAX30100_LED_CURR_50MA +#define RED_LED_CURRENT MAX30100_LED_CURR_27_1MA +// set HIGHRES_MODE to true only +// when setting PULSE_WIDTH to MAX30100_SPC_PW_1600US_16BITS +#define PULSE_WIDTH MAX30100_SPC_PW_1600US_16BITS +#define HIGHRES_MODE true + +// new a object +MAX30100 sensor; + +void setup() +{ + Serial.begin(115200); + Serial.print("Initializing MAX30100.."); + if (!sensor.begin()) { + Serial.println("FAILED"); + for(;;); + } else { + Serial.println("SUCCESS"); + } + sensor.setMode(MAX30100_MODE_SPO2_HR); + sensor.setLedsCurrent(IR_LED_CURRENT, RED_LED_CURRENT); + sensor.setLedsPulseWidth(PULSE_WIDTH); + sensor.setSamplingRate(SAMPLING_RATE); + sensor.setHighresModeEnabled(HIGHRES_MODE); +} + +void loop() +{ + uint16_t ir, red; + sensor.update(); + while (sensor.getRawValues(&ir, &red)) { + Serial.print(ir); + Serial.print('\t'); + Serial.println(red); + } +} +``` + + + +## 原理图 + + + +### 管脚映射 + + + + +
M5Core(GROVE接口A)GPIO22GPIO215VGND
血氧心率UnitSCLSDA5VGND
diff --git a/docs/zh_CN/unit/rfid.md b/docs/zh_CN/unit/rfid.md new file mode 100644 index 00000000..d76cd287 --- /dev/null +++ b/docs/zh_CN/unit/rfid.md @@ -0,0 +1,103 @@ + +# RFID - 射频识别 + + + +*** + +:memo:**[描述](#描述)**      :octocat:**[例程](#例程)**      :electric_plug:**[原理图](#原理图)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.13.57b2425efMuoxt&id=583870753197)** + +## 描述 + +RFID是一款集成**MFRC522**射频识别芯片(通讯在13.56MHz频段)的Unit,利用磁场感应技术,实现进行非接触式双向信息交互,读取感应卡的信息并验证。利用该unit能实现读卡设备功能,能识别并记录多张卡信息,建立门禁系统、打卡系统、仓库货物进存和小区车辆出入登记等方面的应用。 + +该Unit通过GROVE线连接至M5Core的GROVE A接口,并通过IIC通信,其IIC地址为0x28。 + +## 特性 + +- IIC速率400 ~ 3400Kbit/s +- RC522收发缓冲: 64bytes +- 支持的RFID协议: ISO14443A、MIFARE和NTAG +- 工作温度: -20℃-85℃ +- 数据保存: > 10年 +- GROVE接口,支持[Arduino](http://www.arduino.cc)编程 +- Unit内置两个Lego插件孔,方便与Lego件结合 + +## 应用 + +- 智能家居门禁系统 +- 车辆管理 +- RFID食品安全溯源 +- RFID图书管理 + +## 相关链接 + +- **[官方频道视频](https://i.youku.com/i/UNjE1ODA2MzE0OA==?spm=a2hzp.8253869.0.0)** + +- **[官方论坛](http://forum.m5stack.com/)** + +- **数据手册** - [MFRC522](https://www.nxp.com/docs/en/data-sheet/MFRC522.pdf) + +## 例程 + +### 1. Arduino IDE + +*以下仅为用法示意,并不完整。如果需要完整例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/RFID/Arduino)。* + +烧录例程RFID.ino之后,IC卡或者打开手机NFC,靠近unit,在unit附近来回移动,M5Core的屏幕上就会打印出IC卡或手机中RFID芯片的UID。 + +```arduino +/* + RFID.ino +*/ +#include +#include "MFRC522_I2C.h" +#include + +// 0x28 is i2c address on SDA. Check your address with i2cscanner if not match. +MFRC522 mfrc522(0x28); // Create MFRC522 instance. + +// initialization +M5.begin(); Serial.begin(115200); Wire.begin(); +/* Init MFRC522 */ +mfrc522.PCD_Init(); +/* Show details of PCD - MFRC522 Card Reader details */ +ShowReaderDetails(); + +// get the uid of available card +mfrc522.PICC_IsNewCardPresent();// scan for a new card +mfrc522.PICC_ReadCardSerial();// read data +// a new card is selected. The UID and SAK is saved at mfrc522.uid structor. +for (byte i = 0; i < mfrc522.uid.size; i++) { + Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "); + Serial.print(mfrc522.uid.uidByte[i], HEX); +} + +// other function +void ShowReaderDetails() { + /* Get the MFRC522 software version */ + byte v = mfrc522.PCD_ReadRegister(mfrc522.VersionReg); + if (v == 0x91) Serial.print(F(" = v1.0")); + else if (v == 0x92) Serial.print(F(" = v2.0")); + else Serial.print(F(" (unknown)")); +} +``` + + + + + +## 原理图 + + + +### 管脚映射 + + + + +
M5Core(GROVE接口A)GPIO22GPIO215VGND
RFID射频识别UnitSCLSDA5VGND
diff --git a/docs/zh_CN/unit/thermal.md b/docs/zh_CN/unit/thermal.md index 8dce1843..10927d1f 100644 --- a/docs/zh_CN/unit/thermal.md +++ b/docs/zh_CN/unit/thermal.md @@ -1,12 +1,10 @@ # THERMAL - 人体红外成像Unit - + *** -:memo:**[描述](#描述)**      :electric_plug:**[原理图](#原理图)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.70.3a93425e5PQbBs&id=576966170317)** - - +:memo:**[描述](#描述)**      :octocat:**[例程](#例程)**      :electric_plug:**[原理图](#原理图)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.70.3a93425e5PQbBs&id=576966170317)** ## 描述 @@ -38,26 +36,48 @@ - **数据手册** - [MLX90640](http://www.alldatasheet.com/datasheet-pdf/pdf/884988/MELEXIS/MLX90640.html) - +## 例程 - + --> ## 原理图 @@ -67,5 +87,5 @@ float pressure = bme.readPressure();//pressure - +
M5Core(GROVE接口A)GPIO22GPIO215VGND
THERMAL UnitSCLSDA5VGND
人体红外成像UnitSCLSDA5VGND
\ No newline at end of file