mirror of
https://github.com/m5stack/m5-docs.git
synced 2026-05-20 10:23:01 -07:00
Merge branch 'master' of https://github.com/m5stack/m5-docs
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
**セット**
|
||||
|
||||
[](ja/core/m5go_iot_starter_kit) [](ja/core/face_kit)
|
||||
[](ja/core/m5go_lite) [](ja/core/m5go_iot_starter_kit) [](ja/core/face_kit)
|
||||
|
||||
<!-- |[M5GO Starter Kit]()|[FACES Kit]()| -->
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
* * *
|
||||
|
||||
:memo:**[概要](#概要)** :bulb:**[クイックスタート](/zh_CN/quick_start/bala/bala_quick_start)** :octocat:**[サンプルコード](https://github.com/m5stack/M5Bala/tree/master/examples)** 🛒**[購入リンク](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:**[概要](#概要)** :bulb:**[クイックスタート](/ja/quick_start/bala/bala_quick_start)** :octocat:**[サンプルコード](https://github.com/m5stack/M5Bala/tree/master/examples)** 🛒**[購入リンク](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)**
|
||||
|
||||
## 概要
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
# M5GO ベース
|
||||
|
||||
|
||||
|
||||
## 概要
|
||||
|
||||
M5GOベースは、[M5GO IOT Starter Kit](zh_CN/product_documents/m5stack-core/m5go_iot_starter_kit)および[M5Fire](zh_CN/product_documents/m5stack-core/m5core_fire)キットのベースです
|
||||
M5GOベースは、[M5GO IOT Starter Kit](ja/product_documents/m5stack-core/m5go_iot_starter_kit)および[M5Fire](ja/product_documents/m5stack-core/m5core_fire)キットのベースです
|
||||
|
||||
M5GOベースは、600mAhバッテリ、Mバスバスインタフェース、マイク、赤色充電インジケータLED、2つのRGBストリップ(10)、PORT BおよびPORT Cで構成されています。
|
||||
|
||||
@@ -65,7 +63,7 @@ M5GOベースの充電処理中、赤いLEDが点滅し、バッテリが完全
|
||||
## 関連情報
|
||||
|
||||
- **[回路図](https://github.com/m5stack/M5GO/blob/master/hardware/schematics/M5GO_Base.pdf)**
|
||||
- **[M5GO IOT Starter Kit リンクを購入する](https://www.aliexpress.com/store/product/M5Stack-Official-Stock-Offer-M5GO-IoT-Starter-Kit-ESP32-for-Arduino-MicroPython-Programming-Development-IR-MIC/3226069_32881911596.html?spm=2114.12010615.8148356.2.52385ab04i7vIu)**
|
||||
- **[M5GO IOT Starter Kit リンクを購入する](https://www.aliexpress.com/store/product/M5Stack-Official-Stock-Offer-M5GO-IoT-Starter-Kit-ESP32-for-Arduino-MicroPython-Programming-Development-IR-MIC/3226069_32881911596.html)**
|
||||
|
||||
<figure>
|
||||
<img src="assets/img/product_pics/bases/m5go_base_01.png" width="65%" height="65%">
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
# M5GO Lite
|
||||
|
||||
<img src="assets/img/product_pics/core/m5go/m5go_lite_01.png" alt="gray_02" width="250" height="250"><img src="assets/img/product_pics/core/m5go/m5go_lite_04.png" alt="gray_04" width="250" height="250">
|
||||
|
||||
* * *
|
||||
|
||||
:memo:**[概要](#概要)** :bulb:**[クイックスタート](ja/quick_start/m5core/m5stack_core_quick_start)** :octocat:**[サンプルコード](#サンプルコード)** :electric_plug:**[回路図](https://github.com/m5stack/M5-3D_and_PCB/blob/master/M5_Core_SCH%2820171206%29.pdf)** 🛒**[購入リンク](https://www.aliexpress.com/item/M5Stack-NEW-Lite-IoT-Development-Board-Kit-ESP32-MPU9250-Grove-16MFlash-DHT12-Temperature-Humidity-Sensor-Module/32965981279.html)** :clapper:**[関連動画](#関連動画)**
|
||||
|
||||
## 概要
|
||||
|
||||
**<mark>M5GO Lite</mark>**は**ENV unit**と**M5Core White**のコンパクトなキットです。[M5GO IOT Starter Kit](ja/core/m5go_iot_starter_kit)のシンプルなバージョンです。
|
||||
|
||||
M5GO Liteは[UiFlow](http://flow.m5stack.com)やArduino IDEを使用してプログラミングすることができます。
|
||||
|
||||
教育用のコースなども用意しています。興味がある方は、お気軽にこちらのメールアドレスへご連絡ください。<tech@m5stack.com>
|
||||
|
||||
## 特徴
|
||||
|
||||
- サポートする開発環境
|
||||
- Arduino
|
||||
- ESP-IDF
|
||||
- MicroPython
|
||||
- TF Card サポート(最大16GB)
|
||||
|
||||
## パッケージ内容
|
||||
|
||||
- 1x M5Core(白)
|
||||
- 1x M5GO Base
|
||||
- 1x Units
|
||||
- 1x GROVE ケーブル
|
||||
- USB Type-C ケーブル
|
||||
- ユーザーマニュアル
|
||||
|
||||
<img src="assets/img/product_pics/core/m5go/m5go_lite_02.png" alt="gray_02" width="270" height="270"><img src="assets/img/product_pics/core/m5go/m5go_lite_03.png" alt="gray_04" width="270" height="270">
|
||||
|
||||
## 関連リンク
|
||||
|
||||
- **データシート**
|
||||
- [ESP32](https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_cn.pdf)
|
||||
- [MPU9250](https://www.invensense.com/wp-content/uploads/2015/02/PS-MPU-9250A-01-v1.1.pdf)
|
||||
|
||||
## サンプルコード
|
||||
|
||||
以下はENVユニット向けのサンプルコードです。周囲の温度、湿度、気圧を計測します。事前準備として、`Adafruit BMP280 Library`をインストールする必要があります。Arduino IDEの`Preferences`->`追加のボードマネージャURL`に`https://adafruit.github.io/arduino-board-index/package_adafruit_index.json`を追記したのち、`スケッチ`->`ライブラリをインクルード`->`ライブラリを管理`->`Adafruit BMP280`と検索します。
|
||||
|
||||
*完全なソースコードは[こちら](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Core/m5go/m5go_lite/Arduino/ENV)*
|
||||
|
||||
```arduino
|
||||
/*
|
||||
Install Adafruit BMP280 Library first.
|
||||
*/
|
||||
#include <M5Stack.h>
|
||||
#include "DHT12.h"
|
||||
#include <Wire.h> //The DHT12 uses I2C comunication.
|
||||
#include "Adafruit_Sensor.h"
|
||||
#include <Adafruit_BMP280.h>
|
||||
|
||||
// 宣言
|
||||
DHT12 dht12;
|
||||
Adafruit_BMP280 bme;
|
||||
|
||||
// 初期化
|
||||
M5.begin();
|
||||
Wire.begin();
|
||||
bme.begin();
|
||||
|
||||
// データ読み込み
|
||||
float tmp = dht12.readTemperature();
|
||||
float hum = dht12.readHumidity();
|
||||
float pressure = bme.readPressure();
|
||||
```
|
||||
|
||||
**より多くのサンプルコードは[こちら](https://github.com/m5stack/M5Stack/tree/master/examples/Basics)**
|
||||
|
||||
### 2. UIFlow
|
||||
|
||||
*If you want the complete code, please click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/ENV/UIFlow)。*
|
||||
|
||||
<img src="assets/img/product_pics/unit/unit_example/ENV/example_unit_env_01.png" width="30%" height="30%"> <img src="assets/img/product_pics/unit/unit_example/ENV/example_unit_env_02.png" width="55%" height="55%">
|
||||
|
||||
## 関連動画
|
||||
|
||||
- **M5Stack紹介**
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/W5ZfDCBc1lk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
+73
-8
@@ -4,9 +4,7 @@
|
||||
|
||||
***
|
||||
|
||||
: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)** -->
|
||||
: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)**
|
||||
|
||||
## 概要
|
||||
|
||||
@@ -48,12 +46,79 @@
|
||||
|
||||
- **データシート** - [MCP2515](http://ww1.microchip.com/downloads/en/devicedoc/20001801h.pdf) - [TJA1051](https://www.nxp.com/docs/en/data-sheet/TJA1051.pdf) - [SP3485](https://www.exar.com/ds/sp3485.pdf)
|
||||
|
||||
<!-- ## サンプルコード
|
||||
## サンプルコード
|
||||
|
||||
### 1. Arduino IDE
|
||||
### Arduino IDE
|
||||
|
||||
### 2. UIFlow -->
|
||||
#### CAN通信
|
||||
|
||||
## 回路図
|
||||
COMMUでCAN通信を行うためのサンプルコードです。
|
||||
|
||||
<img src="assets/img/product_pics/module/commu_sch.png">
|
||||
[MCP_CAN_lib file](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/COMMU/Arduino/DependentLibrary/MCP_CAN_lib)を`C:\Users\<user_name>\Documents\Arduino\libraries`配下にコピーします。そして`commu_can_transmitter.ino`と`commu_can_receiver.ino`を2つのM5Coreにそれぞれ書き込みます。
|
||||
|
||||
*完全なソースコードは[こちら](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/COMMU/Arduino/CAN)*
|
||||
|
||||
```arduino
|
||||
/*
|
||||
commu_can_transmitter.ino
|
||||
*/
|
||||
#include <M5Stack.h>
|
||||
#include <mcp_can.h>
|
||||
#include "m5_logo.h"
|
||||
|
||||
#define CAN0_INT 15 // Set INT to pin 2
|
||||
MCP_CAN CAN0(12); // Set CS to pin 10
|
||||
|
||||
// 宣言
|
||||
byte data[8] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
|
||||
|
||||
// 初期化
|
||||
M5.begin();
|
||||
CAN0.begin(MCP_ANY, CAN_1000KBPS, MCP_8MHZ);
|
||||
/* Change to normal mode to allow messages tobe transmitted */
|
||||
CAN0.setMode(MCP_NORMAL);
|
||||
|
||||
// データ送信
|
||||
CAN0.sendMsgBuf(0x100, 0, 8, data);
|
||||
```
|
||||
|
||||
```arduino
|
||||
/*
|
||||
commu_can_receiver.ino
|
||||
*/
|
||||
#include <M5Stack.h>
|
||||
#include <mcp_can.h>
|
||||
#include "m5_logo.h"
|
||||
|
||||
#define CAN0_INT 15 // Set INT to pin 2
|
||||
MCP_CAN CAN0(12); // Set CS to pin 10
|
||||
|
||||
// 宣言
|
||||
byte data[8] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
|
||||
|
||||
// 初期化
|
||||
M5.begin();
|
||||
/* Initialize MCP2515 running at 16MHz with a baudrate of 500kb/s */
|
||||
/* and the masks and filters disabled. */
|
||||
CAN0.begin(MCP_ANY, CAN_1000KBPS, MCP_8MHZ);
|
||||
/* Set operation mode to normal so theMCP2515 sends acks to received data. */
|
||||
CAN0.setMode(MCP_NORMAL);
|
||||
pinMode(CAN0_INT, INPUT);// Configuring pin for /INT input
|
||||
|
||||
// 受信データ読み込み
|
||||
CAN0.readMsgBuf(&rxId, &len, rxBuf);
|
||||
```
|
||||
|
||||
<img src="assets/img/product_pics/module/module_example/COMMU/example_module_commu_01.png" width="50%" height="50%">
|
||||
|
||||
#### RS485通信
|
||||
|
||||
COMMUでRS485通信を行うためのサンプルコードです。
|
||||
|
||||
[example](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/COMMU/Arduino/RS485)を 2つのM5Coreにそれぞれ書き込みます。そしてAボタンを押すと、データの送受信が行われます。
|
||||
|
||||
<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">
|
||||
|
||||
+49
-9
@@ -4,9 +4,7 @@
|
||||
|
||||
***
|
||||
|
||||
:memo:**[概要](#概要)** 🛒**[購入リンク](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.13.1dbd425eDUpt0Z&id=583599151180)**
|
||||
|
||||
<!-- :memo:**[概要](#概要)** :octocat:**[サンプルコード](#サンプルコード)** :electric_plug:**[回路図](#回路図)** 🛒**[購入リンク](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.13.1dbd425eDUpt0Z&id=583599151180)** -->
|
||||
:memo:**[概要](#概要)** :octocat:**[サンプルコード](#サンプルコード)** :electric_plug:**[回路図](#回路図)** 🛒**[購入リンク](https://www.aliexpress.com/item/M5Stack-New-USB-Module-USB-HOST-HID-with-MAX3421E-SPI-Interface-Output-5-Input-5-Compatible/32961627365.html)**
|
||||
|
||||
## 概要
|
||||
|
||||
@@ -33,14 +31,56 @@
|
||||
|
||||
- **[フォーラム](http://forum.m5stack.com/)**
|
||||
|
||||
- **データシート** - [MAX3421E](https://www.sparkfun.com/datasheets/DevTools/Arduino/MAX3421E.pdf)
|
||||
- **データシート**
|
||||
- [MAX3421E](https://www.sparkfun.com/datasheets/DevTools/Arduino/MAX3421E.pdf)
|
||||
|
||||
<!-- ## サンプルコード
|
||||
## サンプルコード
|
||||
|
||||
### 1. Arduino IDE
|
||||
*完全なソースコードは[こちら](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/USB/Arduino)。*
|
||||
|
||||
### 2. UIFlow -->
|
||||
`usb_mouse.ino`をM5Coreに書き込みます。USBマウスをモジュールに接続します。マウスの左ボタンを押して緑色の線を描き、右ボタンで白色の線を描きます。中央のボタンを押すと画面をクリアします。
|
||||
|
||||
<!-- ## 回路図 -->
|
||||
```arduino
|
||||
#include <M5Stack.h>
|
||||
#include <SPI.h>
|
||||
#include <Usb.h>
|
||||
#include <hiduniversal.h>
|
||||
#include <hidboot.h>
|
||||
#include <usbhub.h>
|
||||
#include "M5Mouse.h"
|
||||
|
||||
<!-- <img src="assets/img/product_pics/module/usb_sch.png"> -->
|
||||
// new objects
|
||||
USB Usb;
|
||||
USBHub Hub(&Usb);
|
||||
HIDBoot<USB_HID_PROTOCOL_MOUSE> HidMouse(&Usb);
|
||||
MouseRptParser Prs;
|
||||
|
||||
// 初期化
|
||||
M5.begin();
|
||||
Usb.Init();
|
||||
HidMouse.SetReportParser(0,(HIDReportParser*)&Prs);
|
||||
|
||||
// handle event coming from usb device
|
||||
Usb.Task();
|
||||
if(Usb.getUsbTaskState() == USB_STATE_RUNNING)
|
||||
{
|
||||
Mouse_Pointer(mou_px, mou_py);
|
||||
mou_px = 0;
|
||||
mou_py = 0;
|
||||
/* left button pressed: draw white point */
|
||||
if (mou_button == 1)
|
||||
M5.Lcd.drawCircle(StaPotX, StaPotY, 1, WHITE);
|
||||
/* right button pressed: draw green point */
|
||||
if (mou_button == 2)
|
||||
M5.Lcd.drawCircle(StaPotX, StaPotY, 1, GREEN);
|
||||
/* middle button pressed: clear screen */
|
||||
if (mou_button == 4)
|
||||
M5.Lcd.fillScreen(BLACK);
|
||||
}
|
||||
```
|
||||
|
||||
<img src="assets/img/product_pics/module/module_example/USB/example_module_usb_01.png">
|
||||
|
||||
## 回路図
|
||||
|
||||
<img src="assets/img/product_pics/module/usb_sch.png">
|
||||
Reference in New Issue
Block a user