updated quick start docs for BALA
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 208 KiB |
|
After Width: | Height: | Size: 54 KiB |
@@ -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
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Description
|
||||
|
||||
<mark>M5GO Base</mark>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).
|
||||
**<mark>M5GO Base</mark>** 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.
|
||||
|
||||
|
||||
@@ -1,3 +1,118 @@
|
||||
# BALA Get Started
|
||||
# BALA Quick Start
|
||||
|
||||
## (coming soon...)
|
||||
!>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.
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_pogopin.jpg" width="50%" height="50%">
|
||||
|
||||
4. Click the Red button on the side of M5Core (double click for shutdown).
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_power_switch.jpg" width="50%" height="50%">
|
||||
|
||||
5. Click the button on the side of M5Bala Wheel for power on (double click for shutdown).
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_bala_power_switch.jpg" width="50%" height="50%">
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_indicator.jpg" width="50%" height="50%">
|
||||
|
||||
6. Open [UiFlow](http://flow.m5stack.com/) website, and switch programming language from `Blockly` to `Python`.
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_uiflow_01.png">
|
||||
|
||||
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)
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_18.png">
|
||||
|
||||
2. Install `m5stack` library in `Library Manager` of Arduino IDE.
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_19.png">
|
||||
|
||||
3. Install `NeoPixelBus` library in `Library Manager` of Arduino IDE.
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_20.png">
|
||||
|
||||
4. Install `MPU6050_tockn` library in `Library Manager` of Arduino IDE.
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_21.png">
|
||||
|
||||
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.
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_22.png">
|
||||
|
||||
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.
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_14.png">
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_15.png">
|
||||
|
||||
9. Open a bala example: Click `File` -> `Examples` -> `M5Bala` -> `Basic`. (Be careful that example `Default_firmware` has bug.)
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_16.png">
|
||||
|
||||
10. Execute
|
||||
|
||||
<img src="assets/img/getting_started_pics/m5bala/bala_quick_start_23.png">
|
||||
@@ -1,4 +1,4 @@
|
||||
# Unit JOYSTICK
|
||||
# JOYSTICK
|
||||
|
||||
<img src="assets/img/product_pics/unit/M5GO_Unit_joystick_01.png" width="30%" height="30%"><img src="assets/img/product_pics/unit/M5GO_Unit_joystick_02.png" width="30%" height="30%"><img src="assets/img/product_pics/unit/unit_joystick_grove_a.png" width="30%" height="30%">
|
||||
|
||||
|
||||
@@ -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)**
|
||||
|
||||
<!-- :memo:**[概要](#概要)** :octocat:**[サンプルコード](#サンプルコード)** :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 -->
|
||||
|
||||
<!-- ## 回路図 -->
|
||||
## 回路図
|
||||
|
||||
<!-- <img src="assets/img/product_pics/module/commu_sch.png"> -->
|
||||
<img src="assets/img/product_pics/module/commu_sch.png">
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
## 概要
|
||||
|
||||
<mark>**LEGO+**</mark>モジュールは、ATmega328を内蔵したDCモーターコントロールモジュールです。LEGO+モジュールはI2Cを介してM5Coreと通信します。I2Cアドレスは<mark>**0x56**</mark>です。このモジュールには、高電圧入力ドライブのモーターが必要な場合に接続できるDC電源ジャックも装備されています。
|
||||
**<mark>LEGO+</mark>** モジュールは、ATmega328を内蔵したDCモーターコントロールモジュールです。LEGO+モジュールはI2Cを介してM5Coreと通信します。I2Cアドレスは<mark>**0x56**</mark>です。このモジュールには、高電圧入力ドライブのモーターが必要な場合に接続できるDC電源ジャックも装備されています。
|
||||
## 特徴
|
||||
|
||||
- DCコネクタ許容入力電圧範囲:6-12V
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
***
|
||||
|
||||
:memo:**[描述](#描述)** :octocat:**[例程](#例程)** 🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.5-c.w4002-1172588093.64.6c2275f4nUJEfh&id=580999880340)**
|
||||
<!-- :memo:**[描述](#描述)** :octocat:**[例程](#例程)** 🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.5-c.w4002-1172588093.64.6c2275f4nUJEfh&id=580999880340)** -->
|
||||
|
||||
<!-- :memo:**[描述](#描述)** :octocat:**[例程](#例程)** :electric_plug:**[原理图](https://github.com/m5stack/M5-Schematic/blob/master/Modules/module_commu_sch.pdf)** 🛒**[购买链接](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之间会相互发送数据。
|
||||
|
||||
<img src="assets/img/product_pics/module/module_example/COMMU/example_module_commu_02.png" width="50%" height="50%">
|
||||
<img src="assets/img/product_pics/module/module_example/COMMU/example_module_commu_02.png" width="50%" height="50%">
|
||||
|
||||
# 原理图
|
||||
|
||||
<img src="assets/img/product_pics/module/commu_sch.png">
|
||||