diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_14.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_14.png new file mode 100644 index 00000000..29a86bd1 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_14.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_15.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_15.png new file mode 100644 index 00000000..0c62d3e1 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_15.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_16.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_16.png new file mode 100644 index 00000000..1674739e Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_16.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_17.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_17.png new file mode 100644 index 00000000..ef4f2ee7 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_17.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_18.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_18.png new file mode 100644 index 00000000..04fa531c Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_18.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_19.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_19.png new file mode 100644 index 00000000..138129ce Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_19.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_20.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_20.png new file mode 100644 index 00000000..12344d81 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_20.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_21.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_21.png new file mode 100644 index 00000000..687db201 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_21.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_22.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_22.png new file mode 100644 index 00000000..5faa7b47 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_22.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_23.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_23.png new file mode 100644 index 00000000..d07bb73a Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_23.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_files_win.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_files_win.png new file mode 100644 index 00000000..f9ccd2c9 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_files_win.png differ diff --git a/docs/assets/img/product_pics/module/commu_sch.png b/docs/assets/img/product_pics/module/commu_sch.png index 9289c6af..7ec314ce 100644 Binary files a/docs/assets/img/product_pics/module/commu_sch.png and b/docs/assets/img/product_pics/module/commu_sch.png differ diff --git a/docs/assets/img/product_pics/module/weight_sch.png b/docs/assets/img/product_pics/module/weight_sch.png new file mode 100644 index 00000000..58a5dd4f Binary files /dev/null and b/docs/assets/img/product_pics/module/weight_sch.png differ diff --git a/docs/en/app/bala.md b/docs/en/app/bala.md index 016a9caf..e0cd71e7 100644 --- a/docs/en/app/bala.md +++ b/docs/en/app/bala.md @@ -4,7 +4,7 @@ * * * -:memo:**[Description](#Description)**   :bulb:**[Quick Start](/zh_CN/quick_start/bala/bala_quick_start)**   :octocat:**[Example](https://github.com/m5stack/M5Bala/tree/master/examples)**   🛒**[Purchase](https://www.aliexpress.com/store/product/M5Satck-New-BALA-Car-ESP32-Development-Mini-Electric-Self-balancing-Car-2DC-Motor-with-Encoder-PSRAM/3226069_32904033658.html?spm=2114.12010615.8148356.40.1fd3724dW3O2Bu.html)** +:memo:**[Description](#Description)**   :bulb:**[Quick Start](en/quick_start/bala/bala_quick_start)**   :octocat:**[Example](https://github.com/m5stack/M5Bala/tree/master/examples)**   🛒**[Purchase](https://www.aliexpress.com/store/product/M5Satck-New-BALA-Car-ESP32-Development-Mini-Electric-Self-balancing-Car-2DC-Motor-with-Encoder-PSRAM/3226069_32904033658.html?spm=2114.12010615.8148356.40.1fd3724dW3O2Bu.html)** ## Description diff --git a/docs/en/base/m5go_base.md b/docs/en/base/m5go_base.md index 0471e7b4..d7c78cc1 100644 --- a/docs/en/base/m5go_base.md +++ b/docs/en/base/m5go_base.md @@ -2,7 +2,7 @@ ## Description -M5GO Baseis a base of [M5GO IOT Starter Kit](en/product_documents/m5stack-core/m5go_iot_starter_kit) or [M5Fire](en/product_documents/m5stack-core/m5core_fire). +**M5GO Base** is a base of [M5GO IOT Starter Kit](en/product_documents/m5stack-core/m5go_iot_starter_kit) or [M5Fire](en/product_documents/m5stack-core/m5core_fire). M5GO Base is composed of battery(600mAh), M-Bus interface, charging indicator(red led), two RGB Bar, PORT B and PORT C. diff --git a/docs/en/quick_start/bala/bala_quick_start.md b/docs/en/quick_start/bala/bala_quick_start.md index ec7270bd..07aaef88 100644 --- a/docs/en/quick_start/bala/bala_quick_start.md +++ b/docs/en/quick_start/bala/bala_quick_start.md @@ -1,3 +1,118 @@ -# BALA Get Started +# BALA Quick Start -## (coming soon...) \ No newline at end of file +!>For building a M5Bala program, you need prepare M5Stack Fire or M5GO White as master. + +## Prepare + +- Install Serial Driver - [How to Establish Serial Connection](en/related_documents/establish_serial_connection) + +## Development Environment + +1. [UIFlow](#UIFlow) +2. [Arduino IDE](#Arduino-IDE) + +## UIFlow + +1. Burn [UIFlow](http://flow.m5stack.com) firmware - [How to Burn Firmware](en/related_documents/how_to_burn_firmware) +2. WiFi connection - [How to Connect wifi using Core](en/related_documents/how_to_connect_wifi_using_core) +3. Find the location of POGO Pin, and stack M5Core over M5Bala wheel. + + + +4. Click the Red button on the side of M5Core (double click for shutdown). + + + +5. Click the button on the side of M5Bala Wheel for power on (double click for shutdown). + + + + + +6. Open [UiFlow](http://flow.m5stack.com/) website, and switch programming language from `Blockly` to `Python`. + + + +7. Copy the following code to UIFlow and then click `Download` for running it. + +```python +from m5stack import * +from m5ui import * +from m5bala import M5Bala +import i2c_bus +clear_bg(0x111111) + +m5bala = M5Bala(i2c_bus.get(i2c_bus.M_BUS)) +btnA = M5Button(name="ButtonA", text="ButtonA", visibility=False) +btnB = M5Button(name="ButtonB", text="ButtonB", visibility=False) +btnC = M5Button(name="ButtonC", text="ButtonC", visibility=False) +title0 = M5Title(title="Title", fgcolor=0xFFFFFF, bgcolor=0x0000FF) + +title0.setTitle('calirate start') +wait(2) +sampleCount = 2000 +gyroXSum = 0 +gyroYSum = 0 +gyroZSum = 0 + +for _ in range(sampleCount): + gyroXYZ = m5bala.imu.gyro + gyroXSum += gyroXYZ[0] # X + gyroYSum += gyroXYZ[1] # Y + gyroZSum += gyroXYZ[2] # Z + +gyroXMean = gyroXSum / sampleCount +gyroYMean = gyroYSum / sampleCount +gyroZMean = gyroZSum / sampleCount + +m5bala.imu.setGyroOffsets(gyroXMean, gyroYMean, gyroZMean) + +title0.setTitle('balance start') +while True: + m5bala.balance() + wait(0.001) +``` + +## Arduino IDE + +1. Setting Arduino development environment - [Establish Serail Connection](en/related_documents/establish_serial_connection) - [Get Started with Ardino IDE](en/quick_start/m5core/m5stack_core_quick_start) + + + +2. Install `m5stack` library in `Library Manager` of Arduino IDE. + + + +3. Install `NeoPixelBus` library in `Library Manager` of Arduino IDE. + + + +4. Install `MPU6050_tockn` library in `Library Manager` of Arduino IDE. + + + +5. Confirm that M5Core has connected to PC successfully, then click `Tools` -> `Port` for selecting the corresponding serial port on Arduino IDE. + +6. click `Tools` -> `Board: ` for selecting `M5Stack-Core-ESP32` or `M5Stack-Fire` on Arduino IDE. + + + +7. Clone **[M5Bala](https://github.com/m5stack/M5Bala.git)**, If you has not installed Git yet, click [here](https://git-scm.com/download/win) for downloading please and install it. + +```shell +git clone --recursive https://github.com/m5stack/M5Bala.git +``` + +8. Click `Sketch` -> `Include Library` -> `Add .ZIP Library...` for select `M5Bala` which has been cloned just now. + + + + + +9. Open a bala example: Click `File` -> `Examples` -> `M5Bala` -> `Basic`. (Be careful that example `Default_firmware` has bug.) + + + +10. Execute + + \ No newline at end of file diff --git a/docs/en/unit/joystick.md b/docs/en/unit/joystick.md index 15ed00cb..e124f145 100644 --- a/docs/en/unit/joystick.md +++ b/docs/en/unit/joystick.md @@ -1,4 +1,4 @@ -# Unit JOYSTICK +# JOYSTICK diff --git a/docs/ja/module/commu.md b/docs/ja/module/commu.md index c6327a64..7e2637cd 100644 --- a/docs/ja/module/commu.md +++ b/docs/ja/module/commu.md @@ -4,7 +4,7 @@ *** -:memo:**[概要](#概要)**      🛒**[購入リンク](https://www.aliexpress.com/store/product/M5Stack-New-COMMU-Module-Extend-RS485-TTL-CAN-I2C-Port-with-MCP2515-TJA1051-SP3485-Development-Board/3226069_32954475633.html?spm=a2g1y.12024536.productList_5885013.subject_2)** +:memo:**[概要](#概要)**      :electric_plug:**[回路図](#回路図)**      🛒**[購入リンク](https://www.aliexpress.com/store/product/M5Stack-New-COMMU-Module-Extend-RS485-TTL-CAN-I2C-Port-with-MCP2515-TJA1051-SP3485-Development-Board/3226069_32954475633.html?spm=a2g1y.12024536.productList_5885013.subject_2)** @@ -54,6 +54,6 @@ ### 2. UIFlow --> - +## 回路図 - \ No newline at end of file + \ No newline at end of file diff --git a/docs/ja/module/lego_plus.md b/docs/ja/module/lego_plus.md index e2b6cf55..48ed97e0 100644 --- a/docs/ja/module/lego_plus.md +++ b/docs/ja/module/lego_plus.md @@ -8,7 +8,7 @@ ## 概要 -**LEGO+**モジュールは、ATmega328を内蔵したDCモーターコントロールモジュールです。LEGO+モジュールはI2Cを介してM5Coreと通信します。I2Cアドレスは**0x56**です。このモジュールには、高電圧入力ドライブのモーターが必要な場合に接続できるDC電源ジャックも装備されています。 +**LEGO+** モジュールは、ATmega328を内蔵したDCモーターコントロールモジュールです。LEGO+モジュールはI2Cを介してM5Coreと通信します。I2Cアドレスは**0x56**です。このモジュールには、高電圧入力ドライブのモーターが必要な場合に接続できるDC電源ジャックも装備されています。 ## 特徴 - DCコネクタ許容入力電圧範囲:6-12V diff --git a/docs/zh_CN/module/commu.md b/docs/zh_CN/module/commu.md index dfb75962..294bfee2 100644 --- a/docs/zh_CN/module/commu.md +++ b/docs/zh_CN/module/commu.md @@ -4,9 +4,9 @@ *** -:memo:**[描述](#描述)**      :octocat:**[例程](#例程)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.5-c.w4002-1172588093.64.6c2275f4nUJEfh&id=580999880340)** + - +:memo:**[描述](#描述)**      :octocat:**[例程](#例程)**      :electric_plug:**[原理图](#原理图)**      🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.5-c.w4002-1172588093.64.6c2275f4nUJEfh&id=580999880340)** ## 描述 @@ -115,4 +115,8 @@ CAN0.readMsgBuf(&rxId, &len, rxBuf); 分别下载[例程](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/COMMU/Arduino/RS485)到两个M5Core之后,按下按键A,然后两个core之间会相互发送数据。 - \ No newline at end of file + + +# 原理图 + + \ No newline at end of file diff --git a/docs/zh_CN/module/joystick.md b/docs/zh_CN/module/joystick.md new file mode 100644 index 00000000..18bb721f --- /dev/null +++ b/docs/zh_CN/module/joystick.md @@ -0,0 +1 @@ +# JOYSTICK - 摇杆 \ No newline at end of file diff --git a/docs/zh_CN/module/lego_plus.md b/docs/zh_CN/module/lego_plus.md index f58a792f..5cea3c65 100644 --- a/docs/zh_CN/module/lego_plus.md +++ b/docs/zh_CN/module/lego_plus.md @@ -8,7 +8,7 @@ ## 描述 -LEGO+模块是直流编码电机模块,内置MEGA328芯片,管理和控制每个DC口电机。LEGO+模块与M5Core之间通过I2C通信,其I2C地址为0x56。 +**LEGO+** 模块是直流编码电机模块,内置MEGA328芯片,管理和控制每个DC口电机。LEGO+模块与M5Core之间通过I2C通信,其I2C地址为0x56。 模块还自带了直流电源接口,如果需要更高的电压输入驱动电机的话,可以接入电源。 ## 特性 diff --git a/docs/zh_CN/quick_start/bala/bala_quick_start.md b/docs/zh_CN/quick_start/bala/bala_quick_start.md index f76aa693..4db1d533 100644 --- a/docs/zh_CN/quick_start/bala/bala_quick_start.md +++ b/docs/zh_CN/quick_start/bala/bala_quick_start.md @@ -80,51 +80,43 @@ while True: ## Arduino IDE编辑 -1. 搭建M5Stack的Arduino IDE开发环境 - [搭建M5Stack的开发环境](/zh_CN/related_documents/establish_serial_connection) +1. 搭建M5Stack的Arduino IDE开发环境 - [搭建M5Stack的开发环境](/zh_CN/related_documents/establish_serial_connection) - [Get Started with Ardino IDE](en/quick_start/m5core/m5stack_core_quick_start) - + -1. 在Arduino IDE的库管理安装`m5stack`库 -
- -
+2. 在Arduino IDE的库管理安装`m5stack`库 -5. 在Arduino IDE的库管理安装`NeoPixelBus`库 -
- -
+ -1. 在Arduino IDE的库管理安装`MPU6050_tockn`库 -
- -
+3. 在Arduino IDE的库管理安装`NeoPixelBus`库 + + + +4. 在Arduino IDE的库管理安装`MPU6050_tockn`库 + + + +5. 确保M5Core连接到PC,然后从`工具 - >串行端口`中选择适当的串行端口 +6. 同样选择`M5Stack-Core-ESP32`或`M5Stack-Fire`板 + + + +7. 下载 **[M5Bala](https://github.com/m5stack/M5Bala.git)**,如果你不能使用Git,请从[这里](https://git-scm.com/download/win)安装 -7. 确保M5Core连接到PC,然后从`工具 - >串行端口`中选择适当的串行端口 -8. 同样选择`M5Stack-Core-ESP32`或`M5Stack-Fire`板 -9. 下载[M5Bala](https://github.com/m5stack/M5Bala.git)如果你不能使用Git,请从[这里](https://git-scm.com/download/win)安装 ```shell git clone --recursive https://github.com/m5stack/M5Bala.git ``` -10. 在Arduino IDE上创建一个新文件,然后复制并粘贴`M5Bala/src/Default_firmware.ino`的内容 -
- -
-11. 在`Default_firmware.ino`的第89行注释掉`M5.setPowerBoostKeepOn(false);` -
- -
+8. 点击 `Sketch` -> `Include Library` -> `Add .ZIP Library...`,然后选择刚刚clone下来的 `M5Bala`。 -12. 创建一个新选项卡,并以相同的方式复制和粘贴`M5Bala/src/M5Bala.cpp`的内容 -
- -
-
- -
+ -13. 创建一个新选项卡,并以相同的方式复制和粘贴`M5Bala/src/M5Bala.h`的内容 -14. 最后执行 -
- -
\ No newline at end of file + + +9. 打开 bala 的例程: 点击 `File` -> `Examples` -> `M5Bala` -> `Basic`,选择例程 `Basic`。(注意:example `Default_firmware` 存在BUG,暂时不可用。) + + + +10. 执行 + + \ No newline at end of file