This commit is contained in:
LiHuashen
2019-02-20 10:35:56 +08:00
12 changed files with 466 additions and 23 deletions
+2 -2
View File
@@ -74,7 +74,7 @@
**カメラクラス** ( **[クイックスタート](ja/quick_start/m5camera/m5camera_quick_start)**   **[カメラ間の比較](https://shimo.im/sheets/gP96C8YTdyjGgKQC/09fd4)** )
[![unit_esp32cam.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_esp32cam_01.png)](ja/unit/esp32cam)         [![unit_m5camera.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_m5camera_01.png)](ja/unit/m5camera)         
[![unit_esp32cam.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_esp32cam_01.png)](ja/unit/esp32cam)         [![unit_m5camera.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_m5camera_01.png)](ja/unit/m5camera)         [![unit_m5camera_f.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_m5camera_f_01.png)](ja/unit/m5camera_f)
 
@@ -106,7 +106,7 @@
 
[![unit_weight.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_weight_01.png)](ja/unit/weight)
[![unit_weight.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_weight_01.png)](ja/unit/weight)         [![unit_trace.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/unit/unit_trace_01.png)](ja/unit/trace)
 
@@ -16,7 +16,7 @@
<img src="assets/img/getting_started_pics/get_started_with_unit/ESP32CAM_M5CAM.png">
</figure>
1. PCまたはスマートフォンのブラウザを開き、次のURLを入力します。`http://192.168.4.1`
3. PCまたはスマートフォンのブラウザを開き、次のURLを入力します。`http://192.168.4.1`
<figure>
<img src="assets/img/getting_started_pics/get_started_with_unit/ESP32CAM_Browser.png">
@@ -44,7 +44,7 @@ Arduino IDEを開いて`スケッチ -> ライブラリをインクルード ->
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/quick_start_arduino_win_07.png">
!> **Note:** *以下のように表示された場合は、アップデートす。*
!> **Note:** *以下のように表示された場合は、アップデートします。*
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/update_m5stack_lib.png">
@@ -1,13 +1,7 @@
# M5Stick クイックスタート {docsify-ignore-all}
**好きなプログラミング言語を以下から選んでください。**
**好きなプログラミングスタイルを以下から選んでください。**
<img src="assets/img/getting_started_pics/arduino_logo.png"> | <img src="assets/img/getting_started_pics/blockly_and_micropython.png">
---|---
[Arduino](ja/quick_start/m5stick/m5stick_quick_start_with_arduino) | [UiFlow(Blockly/MicroPython)](ja/quick_start/m5stick/m5stick_quick_start_with_uiflow)
<!-- <img src="assets/img/macos-logo.png"> | <img src="assets/img/windows-logo.png"> | <img src="assets/img/getting_started_pics/blockly_and_micropython.png"> -->
<!-- ---|---|--- -->
<!-- [MacOS](ja/quick_start/m5stick/m5stick_quick_start_with_arduino) | [Windows](ja/quick_start/m5stick/m5stack_core_get_started_Arduino_Windows) | [UiFlow(Blockly/MicroPython)](ja/quick_start/m5stick/m5stick_quick_start_with_uiflow) -->
<img src="assets/img/macos-logo.png"> | <img src="assets/img/windows-logo.png"> | <img src="assets/img/getting_started_pics/blockly_and_micropython.png">
---|---|---
[Arduino-MacOS](ja/quick_start/m5stick/m5stick_quick_start_with_arduino_MacOS) | [Arduino-Windows](ja/quick_start/m5stick/m5stick_quick_start_with_arduino_Windows) | [UiFlow](ja/quick_start/m5stick/m5stick_quick_start_with_uiflow)
@@ -0,0 +1,97 @@
# M5Stick クイックスタート(macOS, Arudino) {docsify-ignore-all}
?> *環境設定の前に、シリアルドライバがインストールされているか確認いてください。もしまだの場合は[シリアル接続の確立方法](ja/related_documents/establish_serial_connection)を参照してください。*
## テキストチュートリアル
1. [環境設定](#環境設定)
- Step1. [Arduino IDEインストール](#step1-arduino-ideインストール)
- Step2. [ESP32ボードサポート](#step2-esp32ボードサポート)
- Step3. [M5Stack ライブラリインストール](#step3-m5stack-libインストール)
- Step4. [U8g2 ライブラリインストール](#step4-u8g2-libインストール)
2. [例題](#例題)
## 環境設定
### Step1. `Arduino IDE`インストール
最初にArduino IDEをインストールします。ダウンロードアドレスは https://www.arduino.cc/en/Main/Software です。
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/macOS_download_arduino_ide.png">
### Step2. ESP32ボードサポート
Arduino IDEを起動し、メニューから、`Arduino`->`Peferences`->`Settings`と選択します。
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/quick_start_arduino_mac_01.png">
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/quick_start_arduino_mac_02.png">
最新のESP32ボードマネージャにURLを追加してください。`Additional Boards Manager URLs: `
*最新のボードマネージャURLはこちら:"https://dl.espressif.com/dl/package_esp32_index.json"*
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/quick_start_arduino_mac_03.png">
確認後、`Tools`->`Board:`->`Boards Manager...`を選び、新しいポップアップダイアログで、`ESP32`と入力して検索します。そして`Install`をクリックします。
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/quick_start_arduino_mac_04.png">
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/quick_start_arduino_mac_05.png">
### Step3. M5Stack Libインストール
Arduino IDEを起動し、メニューから`スケッチ`->`ライブラリをインクルード`->`ライブラリを管理...`を選択します。
検索ボックスに`m5stack`と入力して検索し、M5Stackのライブラリをインストールします。
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/quick_start_arduino_mac_06.png">
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/quick_start_arduino_mac_07.png">
### Step4. U8g2 Libインストール
まずArduino IDEを開き、`Sketch`->`Include Library`->`Manage Libraries...`の順に選択します。検索窓で`U8g2`を検索し、インストールします。
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_m5stick/install_u8g2.png">
## 例題
USBケーブルをM5Stickに接続し、ボードとシリアルポートを選択します。そしてサンプルプログラムをコンパイルし、アップロードしてみましょう。
### 1. ボードとシリアルポートを選択
Arduino IDEを起動し、メニューから`ツール -> ボード -> M5Stack-Core-ESP32`とボードを選択します。
次に、メニューから`ツール -> シリアルポート -> /dev/cu.SLAB_USBtoUART` とシリアルポートを選択します。
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/quick_start_arduino_mac_10.png">
### 2. サンプルスケッチ
サンプルスケッチを利用して、定番のHelloWorldを表示してみましょう。メニューから`ファイル -> スケッチ例 -> M5Stack -> Stick -> FactoryTest`と選択します。
<img src="assets/img/getting_started_pics/m5stick/m5stick_arduino_windows_01.png">
**コンパイルしてアップロード実行すると、M5Stickの画面に `Hello World! Exist` と表示されます。**
## ノート
もしシリアルポートが見つからない場合は、Macの`システム環境設定 -> セキュリティとプライバシー`を開いてブロックされているアプリを許可してください。それでもダメな場合は、再度シリアルドライバをインストールしてください。
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/macOS_security_and_privacy.png">
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/macOS_security_and_privacy_01.png">
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/mac/macOS_security_and_privacy_02.png">
?> **Tip** **もしmacOSのパーミッションについてもっと詳しい情報が知りたい方は、次のリンクを参照してください。** https://developer.apple.com/library/archive/technotes/tn2459/\_index.html
## ビデオチュートリアル
<iframe width="560" height="315" src="https://www.youtube.com/embed/U2es-l4z2Zg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
@@ -0,0 +1,79 @@
# M5Stick クイックスタート(Windows, Arudino) {docsify-ignore-all}
?> `USB driver``Git``Arduino IDE` をインストールしているか確認してください。 もしまだの場合は、 [シリアル接続の確立方法](ja/related_documents/establish_serial_connection) と [GitとArduino IDEのインストール方法](ja/related_documents/how_to_install_git_and_arduino)を参照してください。
## コンテンツ
1. [環境設定](#環境設定)
- [Step1. arduino-ESP32サポートのダウンロード](#step1-arduino-esp32サポートのダウンロード)
- [Step2. M5Stackライブラリのダウンロード](#step2-m5stackライブラリのダウンロード)
- [Step3. U8g2 ライブラリインストール](#step3-u8g2-libインストール)
2. [例題](#例題)
## 環境設定
### Step1. arduino-ESP32サポートのダウンロード
Arduino IDEを起動し、メニューから`File`->`Peferences`->`Settings`と選択します。
以下のようにGitHubからリポジトリを取得します。(少し時間がかかります)
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/quick_start_arduino_win_01.png">
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/quick_start_arduino_win_02.png">
最新のESP32ボード管理URLを追加してください`Additional Boards Manager URLs: `
*最新のボードマネージャURLはこちら:"https://dl.espressif.com/dl/package_esp32_index.json"*
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/quick_start_arduino_win_03.png">
`Tools`->`Board:`->`Boards Manager...`を選択し、新しいポップアップダイアログで、`ESP32`と入力して検索します。`Install`をクリックします。
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/quick_start_arduino_win_04.png">
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/quick_start_arduino_win_05.png">
### Step2. M5Stackライブラリのダウンロード
Arduino IDEを開いて`スケッチ -> ライブラリをインクルード -> ライブラリを管理...`と選択します。開いたウィンドウの検索ボックスに`m5stack`と検索し、出てきたライブラリをインストールします。
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/quick_start_arduino_win_06.png">
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/quick_start_arduino_win_07.png">
!> **Note:** *以下のように表示された場合は、アップデートします。*
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/update_m5stack_lib.png">
### Step3. U8g2 Libインストール
まずArduino IDEを開き、`Sketch`->`Include Library`->`Manage Libraries...`の順に選択します。検索窓で`U8g2`を検索し、インストールします。
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_m5stick/install_u8g2.png">
## 例題
このセクションではArduinoでプログラムができるかを確認します。最初に<mark>[MPU9250付きのM5Stick](https://img.alicdn.com/imgextra/i4/136588748/O1CN012EUdFpJIthEANlx_!!136588748.jpg)</mark>とPCをUSBケーブルで接続してください。そしてM5Stickが接続されているシリアルポートを選択し、サンプルプログラムを実行してみましょう。
### 1. `FactoryTest.ino`サンプルスケッチ実行
Arduino IDEのメニューから`ツール`を選択し、ボードとボーレート、シリアルポートを次のように選択します。M5Stack-Core-ESP32、921600、COMx(シリアルポートの番号はお使いの環境によって変わります。)
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/select_board_baudrate_serial_port.png">
メニューから`ファイル -> スケッチ例 -> M5Stack -> Stick -> FactoryTest`を選択します。
<img src="assets/img/getting_started_pics/m5stick/m5stick_arduino_windows_01.png">
コンパイル&アップロード実行します。
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/arduino_upload.png">
**M5Stick画面に"Hello World! Exist"とメッセージが表示されます。**
?> *もしM5Stack Libを更新したい場合はこちらの記事を参照してください。[Arduino IDEのM5Stackライブラリ更新方法](ja/related_documents/upgrade_m5stack_lib).*
@@ -36,7 +36,7 @@
初回起動する際、デフォルトで設定ページが表示されます。OLEDスクリーンに**AP名(SSID)**と**WiFi設定アドレス(192.168.4.1)**が表示されます。
PCまたはスマホを利用して、表示されているAPへ接続します。接続が成功したら、ブラウザからWiFi設定アドレスにアクセスします。そして普段使用しているネットワークのSSIDとパスワードを入力後、`Save`をクリックし、接続が成功するのを待ちます。
PCまたはスマホを利用して、表示されているAPへ接続します。接続が成功したら、ブラウザからWiFi設定アドレスにアクセスします。そして普段使用しているネットワークのSSIDとパスワードを入力して保存の後、接続が成功するのを待ちます。
<img src="assets/img/getting_started_pics/m5stick/stick_04.png">
+2 -2
View File
@@ -4,13 +4,13 @@
***
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;:bulb:**[クイックスタート](ja/quick_start/m5core/m5stack_core_quick_start)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[サンプルコード](#サンプルコード)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:electric_plug:**[回路図](https://github.com/m5stack/M5-回路図/blob/master/Units/esp32-cam/M5CAM-ESP32-A1-POWER.pdf)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/item/M5Stack-Official-ESP32-Camera-Module-Development-Board-OV2640-Camera-Type-C-Grove-Port-3D-Wifi-Antenna/32881414545.html)**
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;:bulb:**[クイックスタート](ja/quick_start/m5camera/m5camera_quick_start)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[サンプルコード](#サンプルコード)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:electric_plug:**[回路図](https://github.com/m5stack/M5-回路図/blob/master/Units/esp32-cam/M5CAM-ESP32-A1-POWER.pdf)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/item/M5Stack-Official-ESP32-Camera-Module-Development-Board-OV2640-Camera-Type-C-Grove-Port-3D-Wifi-Antenna/32881414545.html)**
## 概要
**<mark>ESP32Cam</mark>**ユニットは**ESP32**をメインチップとして備え、他にも**OV2640**、**LiPoチャージャー(IP5306)**を内蔵しています。(ただし4MBのpSRAM非搭載です)。またリチウムバッテリ、MPU6050(ジャイロ+加速度センサー)、BME280(温湿度+気圧センサー)、SPQ2410(マイク)用のパターンが用意されているので、追加部品を半田付けすることで、グレードアップさせることが可能です。それらを組み合わせることでバッテリ駆動の監視システムなどを構築することも可能です。ESP-IDFを利用して、カメラの機能をプログラムすることができます。
**ノート: ESP32CAMは以下のような名ルールがあります。**
**ノート: ESP32CAMは以下のような名ルールがあります。**
*ESP32CAM_#_#_#...*
+4 -4
View File
@@ -1,10 +1,10 @@
# M5Camera ユニット(4MB pSRAM搭載) {docsify-ignore-all}
# M5Camera - ノーマルレンズ (4MB pSRAM搭載) {docsify-ignore-all}
<img src="assets/img/product_pics/unit/unit_m5camera_01.png" width="30%" height="30%"><img src="assets/img/product_pics/unit/unit_m5camera_02.png" width="40%" height="40%">
***
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;:bulb:**[クイックスタート](ja/quick_start/m5core/m5stack_core_quick_start)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[サンプルコード](#サンプルコード)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat::electric_plug:**[回路図](https://github.com/m5stack/M5-Schematic/blob/master/Units/esp32-cam/M5CAM-ESP32-A1-POWER.pdf)** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/item/M5Stack-Official-ESP32-WROVER-with-PSRAM-Camera-Module-OV2640-Type-C-Grove-Port-Mini-Camera-Development/32909972455.html)**
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;:bulb:**[クイックスタート](ja/quick_start/m5camera/m5camera_quick_start)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[サンプルコード](#サンプルコード)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat::electric_plug:**[回路図](https://github.com/m5stack/M5-Schematic/blob/master/Units/esp32-cam/M5CAM-ESP32-A1-POWER.pdf)** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/item/M5Stack-Official-ESP32-WROVER-with-PSRAM-Camera-Module-OV2640-Type-C-Grove-Port-Mini-Camera-Development/32909972455.html)**
## 概要
@@ -14,13 +14,13 @@
表面に貼ってあるシールで見分けることができます。
いくつかのポートが入れ替わっています。(下部ピンマップ参照)
いくつかのピンが入れ替わっています。(下部ピンマップ参照)
<img src="assets/img/product_pics/unit/unit_m5camera_04.png">
またリチウムバッテリ、MPU6050(ジャイロ+加速度センサー)、BME280(温湿度+気圧センサー)、SPM1423(マイク)用のパターンが用意されているので、追加部品を半田付けすることで、グレードアップさせることが可能です。それらを組み合わせることでバッテリ駆動の監視システムなどを構築することも可能です。
**ノート: M5Cameraは以下のような名ルールがあります。**
**ノート: M5Cameraは以下のような名ルールがあります。**
*M5Camera_#_#_#...*
+183
View File
@@ -0,0 +1,183 @@
# M5CameraF - 魚眼レンズ (4MB pSRAM搭載) {docsify-ignore-all}
<img src="assets/img/product_pics/unit/unit_m5camera_f_01.png" width="30%" height="30%"><img src="assets/img/product_pics/unit/unit_m5camera_f_07.png" width="30%" height="30%">
***
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:bulb:**[クイックスタート](ja/quick_start/m5camera/m5camera_quick_start)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[サンプルコード](#サンプルコード)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/item/M5Stack-New-Fish-eye-Camera-Module-OV2640-Fisheye-Mini-Camera-Unit-Demoboard-with-ESP32-PSRAM-Development/32973208335.html)**
## 概要
**<mark>M5CameraF</mark>** はESP32チップ、OV2640 **<mark>including PSRAM</mark>**、**<mark>160° Fisheye Lens</mark>**をベースにした広角型のカメラユニットです。 ESP-IDF や Arduino IDEを利用してプログラムすることができます。
<img src="assets/img/product_pics/unit/unit_m5camera_f_04.png">
このユニットはMPU6050(加速度+ジャイロセンサー)、BME280(温度、湿度、圧力センサー)、および**デジタルマイク(SPM1423)**のパターンを有しています。 これらのデバイスが必要な場合は、それらを自分で半田付けするか、それらの部品が搭載されているバージョンを直接購入することができます。 さらに、M5CameraFはリチウムバッテリーのパターンも有しており、ケースに収めることができるバッテリーのサイズは**80mAh**に対応します。
**ノート: M5Cameraは以下のような命名ルールがあります。**
*M5CameraF_#_#_#...*
* MPU6050付きの場合、M5CameraF_6050
* MPU6050とマイク付きの場合、M5CameraF_6050_MIC
* MPU6050とマイクとBME280付きの場合、M5CameraF_6050_MIC_BME280
<img src="assets/img/product_pics/unit/unit_m5camera_f_02.png" width="100%" height="100%"><img src="assets/img/product_pics/unit/unit_m5camera_f_03.png" width="100%" height="100%">
## 特徴
- ESP32 仕様
- デュアルコア Tensilica LX6 マイクロプロセッサ
- 最大周波数: 240MHz
- **4MB pSRAM**
- **4MB Flash memory**
- 802.11 BGN WiFi送受信機
- デュアルモード Bluetooth (classic and BLE)
- 暗号化のハードウェアアクセラレーション (AES, SHA2, ECC, RSA-4096)
- CP2104 USB-to-UART 変換ドライバ
- OV2640 センサー
- Output Formats(8-bit):
- YUV(422/420)/YCbCr422
- RGB565/555
- 8-bit 圧縮データ
- 8-/10-bit Raw RGBデータ
- フォーマット毎の最大フレームレート
- UXGA/SXGA: 15fps
- SVGA: 30fps
- CIF: 60fps
- スキャンモード: Progressive
- カメラ仕様
- 視野角 : **160 degree**
- 最大解像度: 200万画素
- センサー最大解像度: 1600 * 1200
- サイズ:23.5 × 48 × 23.5mm
## パッケージ内容
- 1x M5Camera
- 1x LEGO アダプタ
- 1x Wall/1515
- 1x USB Type-C ケーブル
<img src="assets/img/product_pics/unit/unit_m5camera_f_05.png" width="50%" height="50%">
## ピンマップ
**Camera Interface PinMap**
| *Interface* | *Camera Pin*| *M5CameraF* |
| :------------------- | :--------:| :------: |
| SCCB Clock | SIOC |IO23 |
| SCCB Data | SIOD |**IO22** |
| System Clock | XCLK |IO27 |
| Vertical Sync | VSYNC |**IO25** |
| Horizontal Reference | HREF |IO26 |
| Pixel Clock | PCLK |IO21 |
| Pixel Data Bit 0 | D2 |IO32 |
| Pixel Data Bit 1 | D3 |IO35 |
| Pixel Data Bit 2 | D4 |IO34 |
| Pixel Data Bit 3 | D5 |IO5 |
| Pixel Data Bit 4 | D6 |IO39 |
| Pixel Data Bit 5 | D7 |IO18 |
| Pixel Data Bit 6 | D8 |IO36 |
| Pixel Data Bit 7 | D9 |IO19 |
| Camera Reset | RESET |IO15 |
| Camera Power Down | PWDN | *see Note 1* |
| Power Supply 3.3V | 3V3 | 3V3 |
| Ground | GND | GND |
**GROVE Interface**
| *Grove* | *M5CameraF* |
| :-----------: | :------: |
| SCL | **IO13** |
| SDA | **IO4** |
| 5V | 5V |
| GND | GND |
**LED Interface**
| *LED* | *M5CameraF* |
| :-----------: | :------: |
| LED_Pin | IO14 |
**<mark>予約済みチップのインターフェース</mark>**
**BME280 Interface**
*I2Cアドレス: 0x76.*
| *BME280* | *M5CameraF* |
| :-----------: | :------: |
| SCL | IO23 |
| SDA | IO22 |
**MPU6050 Interface**
*I2Cアドレス: 0x68.*
| *MPU6050* | *M5CameraF* |
| :-----------: | :------: |
| SCL | IO23 |
| SDA | IO22 |
**MIC(SPM1423) Interface**
| *MIC(SPM1423)* | *M5CameraF* |
| :-----------: | :------: |
| CLK |IO4|
| DATA |IO2|
**<mark>ノート:</mark>**
1. **Camera Power Down**ピンはESP32のGPIOに接続する必要はありません。10Kオームの抵抗でGNDにプルダウンすることができます。
2. いくつかのカメラユニットを準備しています。 簡単な比較表を以下に示します。より詳細な違いが知りたい方は[こちら](https://shimo.im/sheets/gP96C8YTdyjGgKQC/09fd4)。
<img src="assets/img/product_pics/unit/camera_comparison.png">
## 関連リンク
- **[公式ビデオ](https://www.youtube.com/channel/UCozgFVglWYQXbvTmGyS739w)**
- **[フォーラム](http://forum.m5stack.com/)**
- **データシート**
- [ESP32](https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_cn.pdf)
- [OV2640](https://www.uctronics.com/download/cam_module/OV2640DS.pdf)
<!-- - **[The comparison between ESP32CAM and M5Camera](https://github.com/m5stack/M5-Schematic/blob/master/Units/m5camera/hardware_diff_with_ESP32CAM_M5Camera.md)** -->
## サンプルコード
### ファームウェア
- **[M5Camera Firmware](https://github.com/m5stack/m5stack-cam-psram/tree/master)**
<img src="assets/img/product_pics/unit/unit_m5camera_f_06.png" width="50%" height="50%">
<!-- ### Example
- **[Color recognition](https://github.com/m5stack/Applications-cam)**
- **[Face recognition](https://github.com/m5stack/esp-who)** -->
<!-- ```arduino
float tmp = dht12.readTemperature();//temperature
float hum = dht12.readHumidity();//humidity
float pressure = bme.readPressure();//pressure
```
Click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/M5CAMERA)for Specific example. -->
<!-- ## Schematic -->
<!-- <img src="assets/img/product_pics/unit/m5camera_sch.JPG"> -->
<!-- ### PinMap -->
<!-- <table>
<tr><td>M5Core(GROVE A)</td><td>GPIO22</td><td>GPIO21</td></tr>
<tr><td>M5CAMERA Unit</td><td>SCL</td><td>SDA</td></tr>
</table> -->
+90
View File
@@ -0,0 +1,90 @@
# TRACE - ライントレースユニット {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%">
***
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[サンプルコード](#サンプルコード)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:electric_plug:**[回路図](#回路図)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/item/M5Stack-New-TRACE-Board-for-Lidar-Bot-Mini-Car-M5BALA-Balance-Car-with-MEGA328-4-IR/32974626338.html)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:clapper:**[関連動画](#関連動画)**
## 概要
**<mark>TRACE</mark>**は4つのIRセンサとATmega328pが組み込まれたライントレースユニットです。
M5CoreとはGROVE Aで接続します。I2C通信でコントロール可能で、I2Cアドレスは**0x5A**です。
<img src="assets/img/product_pics/unit/unit_trace_03.png" width="60%" height="60%">
## 特徴
- 動作範囲: センサ-反射面の距離が11mm以内
- GROVE インターフェース, [UiFlow](http://flow.m5stack.com) と [Arduino](http://www.arduino.cc)をサポート
## 関連リンク
- **[公式ビデオ](https://www.youtube.com/channel/UCozgFVglWYQXbvTmGyS739w)**
- **[フォーラム](http://forum.m5stack.com/)**
- **[ATmega328pのファームウェア](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)。*
```arduino
#include <M5Stack.h>
#include "Wire.h"
#define TRACE_ADDR 0x5a
// 宣言部
#define VALUE_SPLIT
uint8_t value;
int SensorArray[4] = {0};
// 初期化
m5.begin();
Serial.begin(115200);
Wire.begin();
// データ読み取り
Wire.beginTransmission(TRACE_ADDR);
Wire.write(0x00);
Wire.endTransmission();
Wire.requestFrom(TRACE_ADDR,1);
while(Wire.available()){
value = Wire.read();
}
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)。*
<img src="assets/img/product_pics/unit/unit_example/TRACE/example_unit_trace_01.png">
## 回路図
<img src="assets/img/product_pics/unit/trace_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 Case**
<iframe width="560" height="315" src="https://www.youtube.com/embed/vwzqqE8cL4I" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
@@ -10,7 +10,7 @@
- [Step2. 安装Arduino-M5Stack库](#Step2-安装Arduino-M5Stack库)
- [Step4. 安装U8g2库](#Step4-安装U8g2库)
- [Step3. 安装U8g2库](#Step3-安装U8g2库)
2. [示例](#示例)
@@ -50,7 +50,7 @@
<img src="assets/img/getting_started_pics/m5stack_core/get_started_with_arduino_m5core/windows/update_m5stack_lib.png">
### Step4. 安装U8g2库
### Step3. 安装U8g2库
如果您还没安装`U8g2`库的话,打开Arduino IDE,并点击`Sketch`->`Include Library`->`Manage Libraries...`,搜索`U8g2`进行安装。