This commit is contained in:
LiHuashen
2019-04-10 11:03:39 +08:00
parent aa00289657
commit 3ca96e8a25
6 changed files with 78 additions and 122 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 23 KiB

+18 -34
View File
@@ -6,10 +6,6 @@
:memo:**[Description](#Description)**   :bulb:**[Quick Start](en/quick_start/m5stickc/m5stickc_quick_start_with_arduino_Windows)**   :octocat:**[Example](#Example)**   🛒**[Purchase](https://www.aliexpress.com/item/New-Arrival-2019-M5StickC-1-of-Limited-Trial-Edition-ESP32-PICO-Mini-IoT-Development-Board-Finger/32985247364.html)**   :clapper:**[Related Video](#Related-Video)**
<!-- :memo:**[Description](#Description)**&nbsp;&nbsp;&nbsp;:bulb:**[上手指南](zh_CN/quick_start/m5stick/m5stick_quick_start)**&nbsp;&nbsp;&nbsp;:octocat:**[例程](#例程)**&nbsp;&nbsp;&nbsp;🛒**[Purchase](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.12.7807425e3JNPRr&id=588710395351)**&nbsp;&nbsp;&nbsp;:clapper:**[Related Video](#Related-Video)** -->
<!-- :memo:**[Description](#Description)**&nbsp;&nbsp;&nbsp;:bulb:**[上手指南](zh_CN/quick_start/m5stick/m5stick_quick_start)**&nbsp;&nbsp;&nbsp;:octocat:**[例程](#例程)**&nbsp;&nbsp;&nbsp;:electric_plug:**[原理图](#原理图)**&nbsp;&nbsp;&nbsp;🛒**[Purchase](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.12.7807425e3JNPRr&id=588710395351)**&nbsp;&nbsp;&nbsp;:clapper:**[Related Video](#Related-Video)** -->
## Description
<mark>**M5StickC**</mark> is a ESP32 development board with 0.96 inch **TFT color screen** (80 * 160 resolution), **Red LED**, button, **Microphone**, IR transmitter, 6-axis IMU (SH200Q) and 80 mAH battery. The ESP32 module **ESP32-Pico** in M5StickC also has a built-in 4MB flash. If the M5StickC is equipped with watch-base and watch-belt, you can wear it on your wrist.
@@ -20,8 +16,6 @@
* Shutdown: Press the reset button for at least 6 seconds
<!-- Press for two seconds to turn it on, and press and hold for six seconds to turn it off. -->
**Note:**
* Baudrate supported by M5StickC: 1200 ~115200, 250K, 500K, 750K, 1500K
@@ -83,28 +77,10 @@
<img src="assets/img/product_pics/core/minicore/m5stickc/m5stickc_04.png" alt="gray_02" width=100% height=100%>
<!-- **<mark>注意:</mark>**
*我们有Core有几个版本,下图是它们主要区别的比较。*
- *如果想**查看**详细的资源对比,请点击[这里](https://github.com/m5stack/M5-Schematic/blob/master/Core/hardware_difference_between_cores_zh_CN.md)。*
- *如果想**下载**详细的资源对比,请点击[这里](https://github.com/m5stack/M5-Schematic/blob/master/Core/M5%20Core%20Detailed%20Comparison.xlsx)。*
<img src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_table/core_comparison/core_main_comparison_04_zh_CN.png">
<img src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_table/core_comparison/core_main_comparison_05_zh_CN.png"> -->
## Include
- 1x M5StickC including 80mAh-Battery
<!-- ## 原理图
<img src="assets/img/product_pics/core/minicore/m5stick/m5stick_sch.png" width="500" height="500">
完整原理图请点击[这里](https://github.com/m5stack/M5-Schematic/tree/master/Core/m5stick)。 -->
## Related Link
- **Datasheet**
@@ -119,20 +95,28 @@
- [M5Stick Factory Test](https://github.com/m5stack/M5StickC/tree/master/examples/Basics/FactoryTest)
<!-- - [M5Stick 手表](https://github.com/eggfly/StickWatch) -->
<!-- * **UIFlow**
- [白色方块游戏](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Core/M5Stick/UIFlow) -->
<!-- <img src="assets/img/product_pics/core/minicore/m5stickc/m5stickc_07.png" alt="gray_02" width=50% height=50%> -->
## Related Video
- **M5StickC Case - counter**
<video width="500" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/Twitch201903/StickC%20Watch.mp4" type="video/mp4">
</video>
- **M5StickC Case - 3D mouse**
<video width="500" height="315" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/StickC/3D_Mouse.mp4" type="video/mp4">
</video>
- **M5StickC Case - Test DSD**
<video width="500" height="315" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/Twitch201904/Simple_Watch_Device.mp4" type="video/mp4">
</video>
- **M5StickC Case - Drive buzzer**
<video width="500" height="315" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/Twitch201904/Connect-passive-buzzer-to-M5StickC.mp4" type="video/mp4">
</video>
+7 -1
View File
@@ -179,8 +179,14 @@ This Unit reserves the weld of the 9-axis gyroscope (MPU6050), Temperature and h
## Related Video
**M5Camera Application - Image transmission between M5Camera and M5Core**
**M5Camera Case - Image transmission between M5Camera and M5Core**
<video width="500" height="315" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/Twitch201812/M5Camera.mp4" type="video/mp4">
</video>
**M5Camera Case - Protective pudding**
<video width="500" height="315" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/Twitch201904/Protective-Pudding.mp4" type="video/mp4">
</video>
+19 -34
View File
@@ -6,10 +6,6 @@
:memo:**[描述](#描述)**&nbsp;&nbsp;&nbsp;:bulb:**[上手指南](zh_CN/quick_start/m5stickc/m5stickc_quick_start_with_arduino_Windows)**&nbsp;&nbsp;&nbsp;:octocat:**[例程](#例程)**&nbsp;&nbsp;&nbsp;🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.12.7807425e3JNPRr&id=588710395351)**&nbsp;&nbsp;&nbsp;:clapper:**[相关视频](#相关视频)**
<!-- :memo:**[描述](#描述)**&nbsp;&nbsp;&nbsp;:bulb:**[上手指南](zh_CN/quick_start/m5stick/m5stick_quick_start)**&nbsp;&nbsp;&nbsp;:octocat:**[例程](#例程)**&nbsp;&nbsp;&nbsp;🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.12.7807425e3JNPRr&id=588710395351)**&nbsp;&nbsp;&nbsp;:clapper:**[相关视频](#相关视频)** -->
<!-- :memo:**[描述](#描述)**&nbsp;&nbsp;&nbsp;:bulb:**[上手指南](zh_CN/quick_start/m5stick/m5stick_quick_start)**&nbsp;&nbsp;&nbsp;:octocat:**[例程](#例程)**&nbsp;&nbsp;&nbsp;:electric_plug:**[原理图](#原理图)**&nbsp;&nbsp;&nbsp;🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.12.7807425e3JNPRr&id=588710395351)**&nbsp;&nbsp;&nbsp;:clapper:**[相关视频](#相关视频)** -->
## 描述
<mark>**M5StickC**</mark> 是一个包含 0.96 寸 **TFT 彩屏** (80 x 160 分辨率)、**红色** LED 灯、按键、**麦克风**、红外发射管、六轴姿态传感器 (SH200Q) 和 80mAH 的电池的小型 **ESP32 开发板**。M5StickC 内的 ESP32 模组 **ESP32-Pico** 还内置了 4MB 的flash。如果 M5StickC 装配上表带底座和表带,你可以将它戴在手腕上。
@@ -20,8 +16,6 @@
* 关机:按复位按键,持续至少 6 秒
<!-- 短按两秒开机,长按六秒关机。 -->
**注意:**
* M5StickC 支持的波特率: 1200 ~115200, 250K, 500K, 750K, 1500K
@@ -83,28 +77,10 @@
<img src="assets/img/product_pics/core/minicore/m5stickc/m5stickc_04.png" alt="gray_02" width=100% height=100%>
<!-- **<mark>注意:</mark>**
*我们有Core有几个版本,下图是它们主要区别的比较。*
- *如果想**查看**详细的资源对比,请点击[这里](https://github.com/m5stack/M5-Schematic/blob/master/Core/hardware_difference_between_cores_zh_CN.md)。*
- *如果想**下载**详细的资源对比,请点击[这里](https://github.com/m5stack/M5-Schematic/blob/master/Core/M5%20Core%20Detailed%20Comparison.xlsx)。*
<img src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_table/core_comparison/core_main_comparison_04_zh_CN.png">
<img src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_table/core_comparison/core_main_comparison_05_zh_CN.png"> -->
## 包含
- 1x M5StickC 内置 80mAh-Battery
<!-- ## 原理图
<img src="assets/img/product_pics/core/minicore/m5stick/m5stick_sch.png" width="500" height="500">
完整原理图请点击[这里](https://github.com/m5stack/M5-Schematic/tree/master/Core/m5stick)。 -->
## 相关链接
- **数据手册**
@@ -119,16 +95,6 @@
- [M5StickC 出厂测试例程](https://github.com/m5stack/M5StickC/tree/master/examples/Basics/FactoryTest)
<!-- - [M5Stick 手表](https://github.com/eggfly/StickWatch) -->
<!-- * **UIFlow**
- [白色方块游戏](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Core/M5Stick/UIFlow) -->
<!-- <img src="assets/img/product_pics/core/minicore/m5stickc/m5stickc_07.png" alt="gray_02" width=50% height=50%> -->
## 相关视频
- **M5StickC 的案例 - 计数器**
@@ -136,3 +102,22 @@
<video width="500" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/Twitch201903/StickC%20Watch.mp4" type="video/mp4">
</video>
- **M5StickC 的案例 - 3D 鼠标**
<video width="500" height="315" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/StickC/3D_Mouse.mp4" type="video/mp4">
</video>
- **M5StickC 的案例 - 测试 DSD**
<video width="500" height="315" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/Twitch201904/Simple_Watch_Device.mp4" type="video/mp4">
</video>
- **M5StickC 的案例 - 驱动蜂鸣器**
<video width="500" height="315" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/Twitch201904/Connect-passive-buzzer-to-M5StickC.mp4" type="video/mp4">
</video>
+6
View File
@@ -183,3 +183,9 @@ M5Camera Unit 有 A Model 和 B Model 两种接口版本。
<video width="500" height="315" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/Twitch201812/M5Camera.mp4" type="video/mp4">
</video>
**M5Camera 的应用 - 保护布丁**
<video width="500" height="315" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/Twitch201904/Protective-Pudding.mp4" type="video/mp4">
</video>
+28 -53
View File
@@ -1,33 +1,24 @@
# TRACE - 巡线 Unit {docsify-ignore-all}
# TRACE - 巡线Unit {docsify-ignore-all}
<img src="assets/img/product_pics/unit/unit_trace_01.png" width="30%" height="30%"><img src="assets/img/product_pics/unit/unit_trace_02.png" width="30%" height="30%">
<img src="assets/img/product_pics/unit/M5GO_Unit_trace_01.png" width="30%" height="30%">
***
:memo:**[描述](#描述)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[例程](#例程)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:electric_plug:**[原理图](#原理图)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.12.4c32425eGaqxO8&id=587199991600)**
:memo:**[描述](#描述)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[例程](#例程)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:electric_plug:**[原理图](#原理图)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.66.159c425eoqBTTY&id=577874535012)**
## 描述
**<mark>TRACE</mark>** 是一款内置 4 组红外发射 LED 和红外敏感光电晶体管的巡线 Unit。它可以将数字信号输出到微控制器,这样机器人可以稳定地跟随白色背景上的黑线,反之亦然
**<mark>TRACE</mark>** 是一款内置MEGA328芯片控制的摇杆模块,可以输出X-Y两个方向的摇杆偏移量,可以判断Z方向是否按下的
该 Unit 与 M5Core 通过 GROVE A 接口 ( IIC ) 通信,其 I2C 地址是 0x5A
内部电路里,摇杆的X方向与MEGA328的A0管脚相连,Y方向与MEGA328的A1管脚相连,Z方向与MEGA的A2管脚相连
<img src="assets/img/product_pics/unit/unit_trace_03.png" width="60%" height="60%">
Joystick Unit同样也是与M5Core相连之后,通过PORT A(I2C)控制,其I2C地址是0x52。M5Core只需要读取0x52的I2C地址数据即可知道摇杆的偏移情况。
## 特性
- 工作范围:反射面距离光电对管面小于 11mm
- GROVE 接口,支持 [UIFlow](http://flow.m5stack.com) 编程,[Arduino](http://www.arduino.cc) 编程
## 包含
- 1x TRACE Unit
- 1x Grove 线
## 应用
- 机器人巡线
- X, Y方向的范围10~250, Z方向(0: 未按下, 1: 按下)
- GROVE接口,支持[UiFlow](http://flow.m5stack.com)编程,[Arduino](http://www.arduino.cc)编程
- Unit内置两个Lego插件孔,方便与Lego件结合
## 相关链接
@@ -35,68 +26,52 @@
- **[官方论坛](http://forum.m5stack.com/)**
- **[模块内 MEGA328 固件](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/TRACE/firmware_328p)**
## 例程
### 1. Arduino IDE
*以下仅为用法示意,并不完整。如果需要完整例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/TRACE/Arduino)。*
*以下仅为用法示意,并不完整。如果需要完整例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/JOYSTICK/Arduino)。*
```arduino
#include <M5Stack.h>
#include "Wire.h"
#define TRACE_ADDR 0x5a
#define JOY_ADDR 0x52
// declaration
#define VALUE_SPLIT
uint8_t value;
int SensorArray[4] = {0};
uint8_t x_data, y_data, button_data;
char data[100];
// initialization
m5.begin();
Serial.begin(115200);
Wire.begin();
M5.begin();
M5.Lcd.clear();
dacWrite(25, 0);//disable the speak noise
Wire.begin(21, 22, 400000);
// read data
Wire.beginTransmission(TRACE_ADDR);
Wire.write(0x00);
Wire.endTransmission();
Wire.requestFrom(TRACE_ADDR,1);
while(Wire.available()){
value = Wire.read();
Wire.requestFrom(JOY_ADDR, 3);
if (Wire.available()) {
x_data = Wire.read();// X(range: 10~250)
y_data = Wire.read();// Y(range: 10~250)
button_data = Wire.read();// Z(0: released 1: pressed)
sprintf(data, "x:%d y:%d button:%d\n", x_data, y_data, button_data);
}
SensorArray[3] = (value&0x08)>>3;
SensorArray[2] = (value&0x04)>>2;
SensorArray[1] = (value&0x02)>>1;
SensorArray[0] = (value&0x01)>>0;
```
<img src="assets/img/product_pics/unit/unit_trace_04.png">
### 2. UIFlow
*具体例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/TRACE/UIFlow)。*
*具体例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/JOYSTICK/UIFlow)。*
<img src="assets/img/product_pics/unit/unit_example/TRACE/example_unit_trace_01.png">
<img src="assets/img/product_pics/unit/unit_example/JOYSTICK/example_unit_joystick_03.png">
## 原理图
<img src="assets/img/product_pics/unit/trace_sch.png">
<img src="assets/img/product_pics/unit/joystick_sch.png">
### 管脚映射
<table>
<tr><td>M5Core(GROVE接口A)</td><td>GPIO22</td><td>GPIO21</td><td>5V</td><td>GND</td></tr>
<tr><td>TRACE Unit</td><td>SCL</td><td>SDA</td><td>5V</td><td>GND</td></tr>
</table>
## 相关视频
**TRACE 的演示**
<video width="500" height="315" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Blog/Twitch201901/lidarbot.mp4" type="video/mp4">
</video>
<tr><td>摇杆Unit</td><td>SCL</td><td>SDA</td><td>5V</td><td>GND</td></tr>
</table>