diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_add_board_manager_01.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_add_board_manager_01.png new file mode 100644 index 00000000..0721fb44 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_add_board_manager_01.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_add_board_manager_02.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_add_board_manager_02.png new file mode 100644 index 00000000..747e52ce Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_add_board_manager_02.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_bala_power_switch.jpg b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_bala_power_switch.jpg new file mode 100644 index 00000000..49865881 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_bala_power_switch.jpg differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_burn.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_burn.png new file mode 100644 index 00000000..0f74148f Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_burn.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_comment_out.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_comment_out.png new file mode 100644 index 00000000..ca1876b6 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_comment_out.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_files.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_files.png new file mode 100644 index 00000000..87ec3198 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_files.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_indicator.jpg b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_indicator.jpg new file mode 100644 index 00000000..c81bec16 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_indicator.jpg differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_newtab_01.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_newtab_01.png new file mode 100644 index 00000000..5aed55e4 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_newtab_01.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_newtab_02.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_newtab_02.png new file mode 100644 index 00000000..38b00e70 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_newtab_02.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_pogopin.jpg b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_pogopin.jpg new file mode 100644 index 00000000..70716a38 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_pogopin.jpg differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_power_switch.jpg b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_power_switch.jpg new file mode 100644 index 00000000..b99369fd Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_power_switch.jpg differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_esp32.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_esp32.png new file mode 100644 index 00000000..4df42dba Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_esp32.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_m5stack.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_m5stack.png new file mode 100644 index 00000000..33ccb6f3 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_m5stack.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_mpu6050_tockn.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_mpu6050_tockn.png new file mode 100644 index 00000000..f5af3eba Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_mpu6050_tockn.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_neopixelbus.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_neopixelbus.png new file mode 100644 index 00000000..5cd98925 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_search_neopixelbus.png differ diff --git a/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_uiflow_01.png b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_uiflow_01.png new file mode 100644 index 00000000..37a1ded2 Binary files /dev/null and b/docs/assets/img/getting_started_pics/m5bala/bala_quick_start_uiflow_01.png differ diff --git a/docs/en/product_documents/units/unit_esp32cam.md b/docs/en/product_documents/units/unit_esp32cam.md index 73cfe30b..6270a6d0 100644 --- a/docs/en/product_documents/units/unit_esp32cam.md +++ b/docs/en/product_documents/units/unit_esp32cam.md @@ -12,7 +12,7 @@ The ESP32Cam equips the ESP32 with everything necessary to program, run and deve ## INCLUDES - 1x M5 Camera -- 1x Type-C USB v +- 1x Type-C USB Cable ## FEATURES diff --git a/docs/en/product_documents/units/unit_m5camera.md b/docs/en/product_documents/units/unit_m5camera.md index 49b1422f..bddeb721 100644 --- a/docs/en/product_documents/units/unit_m5camera.md +++ b/docs/en/product_documents/units/unit_m5camera.md @@ -12,7 +12,7 @@ The M5Camera equips the ESP32 with everything necessary to program, run and deve ## INCLUDES - 1x M5 Camera -- 1x Type-C USB v +- 1x Type-C USB Cable ## FEATURES diff --git a/docs/ja/product_documents/applications/application_bala.md b/docs/ja/product_documents/applications/application_bala.md index bfe351ee..1eb3d930 100644 --- a/docs/ja/product_documents/applications/application_bala.md +++ b/docs/ja/product_documents/applications/application_bala.md @@ -56,6 +56,9 @@ - **GitHub** - [M5Bala](https://github.com/m5stack/M5Bala) +- **クイックスタート** + - [M5Balaクイックスタート](/ja/quick_start/bala/bala_quick_start) +
diff --git a/docs/ja/product_documents/units/unit_esp32cam.md b/docs/ja/product_documents/units/unit_esp32cam.md index 3b2ed944..273af988 100644 --- a/docs/ja/product_documents/units/unit_esp32cam.md +++ b/docs/ja/product_documents/units/unit_esp32cam.md @@ -38,7 +38,7 @@ ## パッケージ内容 -- 1x M5 カメラ +- 1x ESP32Cam - 1x USB Type-C ケーブル ## ドキュメント diff --git a/docs/ja/product_documents/units/unit_m5camera.md b/docs/ja/product_documents/units/unit_m5camera.md index fbc31f2c..319c3500 100644 --- a/docs/ja/product_documents/units/unit_m5camera.md +++ b/docs/ja/product_documents/units/unit_m5camera.md @@ -39,7 +39,7 @@ ## パッケージ内容 -- 1x M5 カメラ +- 1x M5Camera - 1x USB Type-C ケーブル ## ドキュメント @@ -69,4 +69,5 @@ ## 関連情報 +- [M5Camera ユニット 購入(スイッチサイエンス)](https://www.switch-science.com/catalog/5207/) - [M5Camera ユニット 購入(AliExpress)](https://www.aliexpress.com/store/product/M5Stack-ESP32-WROVER-PSRAM-OV2640-C/3226069_32909972455.html) \ No newline at end of file diff --git a/docs/ja/quick_start/bala/bala_quick_start.md b/docs/ja/quick_start/bala/bala_quick_start.md index 87574702..f589fcd0 100644 --- a/docs/ja/quick_start/bala/bala_quick_start.md +++ b/docs/ja/quick_start/bala/bala_quick_start.md @@ -2,4 +2,141 @@ [中文](zh_CN/quick_start/bala/bala_quick_start) | [English](en/quick_start/bala/bala_quick_start) | 日本語 -## (coming soon...) \ No newline at end of file +!>M5Balaを使用するためには、M5Stack FIREまたはM5GO(WHITE)のいずれかが別途必要になります。 + +## 準備 + +- シリアルドライバをインストールします。- [シリアル接続の確立方法](/ja/related_documents/establish_serial_connection) + +## 開発環境選択 + +1. [UiFlow編](#UiFlow編) +2. [Arduino IDE編](#Arduino-IDE編) + +## UIFlow編 + +1. UiFlow向けのファームウェアを書込みます。- [ファームウェアの更新方法](/ja/related_documents/how_to_burn_firmware) +2. Wi-Fi接続設定を行います。- [M5StackのWi-Fi接続方法](/ja/related_documents/how_to_connect_wifi_using_core) +3. ポゴピンの位置を確認して、M5BalaにM5Stackコアを重ねます。 +
+ +
+ +4. M5Stackの横の赤いスイッチを押して、起動します。(2回連続でクリックすると電源OFF) +
+ +
+ +5. M5Balaのスイッチを押して起動します。(2回連続でクリックすると電源OFF) +
+ +
+
+ +
+ +6. [UiFlow](http://flow.m5stack.com/)にアクセスし、モードをBlocklyからPythonに切り替えます。 +
+ +
+ +7. 以下のコードを貼り付けて実行すると、バランスを取ります。 + +```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. Arduino IDEをインストールします。 +2. Arduino IDEの設定から追加のボードマネージャのURLに`https://dl.espressif.com/dl/package_esp32_index.json`を追加します。 +
+ +
+
+ +
+ +3. Arduino IDEにボードマネージャから`esp32`をインストールします。 +
+ +
+ +1. Arduino IDEにライブラリマネージャから`m5stack`ライブラリをインストールします。 +
+ +
+ +5. Arduino IDEにライブラリマネージャから`NeoPixelBus`ライブラリをインストールします。 +
+ +
+ +6. Arduino IDEにライブラリマネージャから`MPU6050_tockn`ライブラリをインストールします。 +
+ +
+ +7. M5Stackがパソコンに接続されていることを確認してから、`ツール -> シリアルポート`から適切なシリアルポートを選択します。 +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);`をコメントアウトします。 +
+ +
+ +12. 新規タブを作成し、同様に`M5Bala/src/M5Bala.cpp`の中身をコピーして貼り付けます。 +
+ +
+
+ +
+ +13. 新規タブを作成し、同様に`M5Bala/src/M5Bala.h`の中身をコピーして貼り付けます。 +14. 最後に書込みを実行します。 +
+ +
\ No newline at end of file diff --git a/docs/ja/related_documents/how_to_burn_firmware.md b/docs/ja/related_documents/how_to_burn_firmware.md index 34d6fe39..7fa3c357 100644 --- a/docs/ja/related_documents/how_to_burn_firmware.md +++ b/docs/ja/related_documents/how_to_burn_firmware.md @@ -22,6 +22,7 @@ pip install esptool 3. 次にファームウェアをダウンロードし、解凍します。 + - UiFlow以外 ```shell mkdir m5burner && \ cd m5burner && \ @@ -29,10 +30,18 @@ curl -O http://res.m5stack.com/M5Burner/M5Burner.zip && \ unzip M5Burner.zip ``` -4. 解凍が終わったら、リストを表示します。 + - UiFlowのみ +```shell +mkdir m5burner && \ +cd m5burner && \ +curl -O http://flow.m5stack.com/download/M5Burner-flow-only.zip && \ +unzip M5Burner-flow-only.zip +``` + +1. 解凍が終わったら、リストを表示します。 ```shell -ls +ls firmwares/ ```
@@ -41,12 +50,16 @@ ls 5. そして書き込みたいファームウェアを選び、ディレクトリを移動します。 +```shell cd path/to/firmware/version/ ls +``` 6. flash.sh という名前のファイルがあるところまで移動したら、M5Stackとパソコンの接続を確認し、以下のコマンドを入力します。 +```shell sh flash.sh +``` 7. 書き込みが完了したら、M5Stackのリセットボタンを押して、ファームウェアの更新の完了です。 diff --git a/docs/zh_CN/product_documents/applications/application_bala.md b/docs/zh_CN/product_documents/applications/application_bala.md index b5f79385..f27c51c4 100644 --- a/docs/zh_CN/product_documents/applications/application_bala.md +++ b/docs/zh_CN/product_documents/applications/application_bala.md @@ -24,7 +24,7 @@ ## 相关链接 - **例程** - [Arduino](https://github.com/m5stack/M5Bala/tree/master/examples) - [MicroPython](https://github.com/m5stack/M5Bala/tree/master/mpy) -- **[上手指南](https://github.com/m5stack/M5Bala)** +- **[上手指南](/zh_CN/quick_start/bala/bala_quick_start)** - **[购买链接](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)**
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 b051280c..ddf5a662 100644 --- a/docs/zh_CN/quick_start/bala/bala_quick_start.md +++ b/docs/zh_CN/quick_start/bala/bala_quick_start.md @@ -1,5 +1,142 @@ -# BALA Get Started +# BALA 上手指南 中文 | [English](en/quick_start/bala/bala_quick_start) | [日本語](ja/quick_start/bala/bala_quick_start) -## (在编辑中...) \ No newline at end of file +!>为了使用M5Bala,需要M5Stack FIRE或M5GO(白色)。 + +## 准备 + +- 安装串行驱动程序 - [如何安装USB驱动并建立与PC的串口通讯](/ja/related_documents/establish_serial_connection) + +## 开发环境 + +1. [UiFlow编辑](#UiFlow编辑) +2. [Arduino IDE编辑](#Arduino-IDE编辑) + +## UIFlow编辑 + +1. 烧录UiFlow的固件 - [如何通过M5Burner烧录固件](/ja/related_documents/how_to_burn_firmware) +2. WiFi链接 - [如何使用M5Core连接可联网的WiFi热点](/ja/related_documents/how_to_connect_wifi_using_core) +3. 检查弹簧针的位置,并将M5Core堆叠在M5Bala上 +
+ +
+ +4. 按M5Core旁边的红色按钮启动(连续点击两次时关闭电源) +
+ +
+ +1. 按M5Bala旁边的按钮启动(连续点击两次时关闭电源) +
+ +
+
+ +
+ +6. 转到[UiFlow](http://flow.m5stack.com/)网站并将模式从Blockly切换到Python +
+ +
+ +7. 粘贴以下代码并执行它以平衡 + +```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. 安装Arduino IDE +2. 在Arduino IDE的设置board manager附加网址加`https://dl.espressif.com/dl/package_esp32_index.json` +
+ +
+
+ +
+ +1. 在Arduino IDE的板管理安装`esp32`库 +
+ +
+ +1. 在Arduino IDE的库管理安装`m5stack`库 +
+ +
+ +5. 在Arduino IDE的库管理安装`NeoPixelBus`库 +
+ +
+ +1. 在Arduino IDE的库管理安装`MPU6050_tockn`库 +
+ +
+ +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);` +
+ +
+ +12. 创建一个新选项卡,并以相同的方式复制和粘贴`M5Bala/src/M5Bala.cpp`的内容 +
+ +
+
+ +
+ +13. 创建一个新选项卡,并以相同的方式复制和粘贴`M5Bala/src/M5Bala.h`的内容 +14. 最后执行 +
+ +
\ No newline at end of file