updated MODULE and UNIT(japanese version)

This commit is contained in:
LiHuashen
2018-12-29 18:15:57 +08:00
parent 6e01f3788c
commit da303c8a87
54 changed files with 928 additions and 180 deletions
+1 -2
View File
@@ -8,7 +8,7 @@
## 概要
**<mark>BATTERY</mark>**モジュールは850mAhの大容量バッテリを内蔵しています。
**<mark>BATTERY</mark>**モジュールは**850mAh**の大容量バッテリを内蔵しています。
これによりM5Stack単独で動作するポータブルデバイスを開発する事が可能です。
@@ -25,4 +25,3 @@
- **[公式ビデオ](https://www.youtube.com/channel/UCozgFVglWYQXbvTmGyS739w)**
- **[フォーラム](http://forum.m5stack.com/)**
+6 -4
View File
@@ -4,7 +4,9 @@
***
: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/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:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](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:**[概要](#概要)**&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/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)** -->
## 概要
@@ -46,12 +48,12 @@
- **データシート** - [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
### 2. UIFlow
### 2. UIFlow -->
## 回路図
<!-- ## 回路図 -->
<!-- <img src="assets/img/product_pics/module/commu_sch.png"> -->
+42 -2
View File
@@ -40,9 +40,49 @@
## サンプルコード
### 1. Arduino IDE
### Arduino IDE
### 2. UIFlow
*特定のルーチン`GPSRaw.ino`クリックしてください[ここで](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/GPS/Arduino)。*
```arduino
#include <M5Stack.h>
/* By default, GPS is connected with M5Core through UART2 */
HardwareSerial GPSRaw(2);
void setup() {
M5.begin();
GPSRaw.begin(9600);// GPS init
Serial.println("hello");
termInit();
}
void loop() {
// put your main code here, to run repeatedly:
if(Serial.available()) {
int ch = Serial.read();
GPSRaw.write(ch);
}
if(GPSRaw.available()) {
int ch = GPSRaw.read();// read GPS information
Serial.write(ch);
termPutchar(ch);
}
}
```
ダウンロードルーチン`GPSRaw.ino`後に, シリアルディスプレイ端末は以下の同様の情報を印刷します.
```
$GPGSA,A,1,,,,,,,,,,,,,25.5,25.5,25.5*02
$BDGSA,A,1,,,,,,,,,,,,,25.5,25.5,25.5*13
$GPGSV,1,1,00*79
$BDGSV,1,1,00*68
$GNRMC,,V,,,,,,,,,,M*4E
$GNVTG,,,,,,,,,M*2D
$GNZDA,,,,,,*56
$GPTXT,01,01,01,ANTENNA OPEN*25
```
## 回路図
+7 -1
View File
@@ -25,12 +25,18 @@
- **[フォーラム](http://forum.m5stack.com/)**
- **[モジュール内のMEGA328ファームウェア](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/LEGO_PLUS/firmware_328p)**
## サンプルコード
### 1. Arduino IDE
<!-- ### 1. Arduino IDE -->
### 2. UIFlow
*特定のルーチンをクリックしてください[ルーチン](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/LEGO_PLUS/UIFlow)。*
<img src="assets/img/product_pics/module/module_example/LEGO_PLUS/example_module_lego_plus_01.png" width="40%" height="40%"> <img src="assets/img/product_pics/module/module_example/LEGO_PLUS/example_module_lego_plus_02.png" width="45%" height="45%">
<!-- ## 回路図 -->
<!-- <img src="assets/img/product_pics/module/lego_plus_sch.png"> -->
+6 -4
View File
@@ -1,10 +1,12 @@
# LORA モジュール
# LORA モジュール(433MHz)
<img src="assets/img/product_pics/module/module_lora_01.png" width="30%" height="30%"> <img src="assets/img/product_pics/module/module_lora_02.png" width="30%" height="30%"> <img src="assets/img/product_pics/module/module_lora_03.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/store/product/M5Stack-Official-Stock-Offer-LoRa-Module-for-ESP32-DIY-Development-Kit-Wireless-433MHz-Built-in-Antenna/3226069_32839736315.html?spm=2114.12010615.8148356.22.25e96be7xE1y22.html)**
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/store/product/M5Stack-Official-Stock-Offer-LoRa-Module-for-ESP32-DIY-Development-Kit-Wireless-433MHz-Built-in-Antenna/3226069_32839736315.html?spm=2114.12010615.8148356.22.25e96be7xE1y22.html)**
<!-- :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/store/product/M5Stack-Official-Stock-Offer-LoRa-Module-for-ESP32-DIY-Development-Kit-Wireless-433MHz-Built-in-Antenna/3226069_32839736315.html?spm=2114.12010615.8148356.22.25e96be7xE1y22.html)** -->
## 概要
@@ -45,12 +47,12 @@ LoRa™は少ない消費電力で広いエリアをカバーする無線通信
digitalWrite(5,HIGH);
m5.begin();
```
## サンプルコード
<!-- ## サンプルコード
### 1. Arduino IDE
### 2. UIFlow
## 回路図
## 回路図 -->
<!-- <img src="assets/img/product_pics/module/lora_sch.png"> -->
+83 -6
View File
@@ -1,10 +1,12 @@
# LoRaWAN モジュール
# LoRaWAN モジュール(433/470MHz和868/915MHz)
<img src="assets/img/product_pics/module/module_lorawan_01.png" width="30%" height="30%"> <img src="assets/img/product_pics/module/module_lorawan_02.png" width="30%" height="30%">
<img src="assets/img/product_pics/module/module_lora_01.png" width="30%" height="30%"> <img src="assets/img/product_pics/module/module_lora_02.png" width="30%" height="30%"> <img src="assets/img/product_pics/module/module_lora_03.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/store/product/M5Stack-New-LoRaWAN-Module-433-470Mhz-868-915MHz-with-Internal-Antenna-and-MCX-External-Antenna-Port/3226069_32953098569.html?spm=a2g1y.12024536.productList_5885011.pic_2)**
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/store/product/M5Stack-New-LoRaWAN-Module-433-470Mhz-868-915MHz-with-Internal-Antenna-and-MCX-External-Antenna-Port/3226069_32953098569.html?spm=a2g1y.12024536.productList_5885011.pic_2)**
<!-- :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/store/product/M5Stack-New-LoRaWAN-Module-433-470Mhz-868-915MHz-with-Internal-Antenna-and-MCX-External-Antenna-Port/3226069_32953098569.html?spm=a2g1y.12024536.productList_5885011.pic_2)** -->
## 概要
@@ -49,10 +51,85 @@
## サンプルコード
### 1. Arduino IDE
### Arduino IDE
### 2. UIFlow
これはピアツーピア通信のためのルーチンです.
## 回路図
*特定のルーチンをクリックしてください[ルーチン](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/LORAWAN/Arduino)。*
```arduino
/*
Master.ino
*/
#include <M5Stack.h>
// entry test mode
String cmd_test_mode = "AT+Mode=Test";
// Configure the modem,like Freq, SF, BW, Preamble length, TX output power
String cmd_rfconf = "AT+TEST=RFCFG,472.3,8,250,8,8,20";
// send data as HEX format
String cmd_send_data = "AT+TEST=TXLRPKT,\"30 31 32 33 34 35\"";
void setup() {
M5.begin();
Serial.begin(9600);
Serial2.begin(9600, SERIAL_8N1, 16, 17);
delay(1000);// delay for lorawan power on
/* LoRaWAN Init */
Serial2.println(cmd_test_mode);
delay(500);
Serial2.println(cmd_rfconf);
delay(500);
}
void loop() {
if(M5.BtnA.wasPressed()) {
Serial2.println(cmd_send_data);
Serial.println(cmd_send_data);
}
M5.update();
}
```
```arduino
/*
Slaver.ino
*/
#include <M5Stack.h>
// entry test mode
String cmd_test_mode = "AT+Mode=Test";
// Configure the modem,like Freq, SF, BW, Preamble length
String cmd_rfconf = "AT+TEST=RFCFG,472.3,8,250,8,8,20";
// allow to receive data
String cmd_receive_data = "AT+TEST=RXLRPKT";
void setup() {
M5.begin();
Serial.begin(9600);
Serial2.begin(9600, SERIAL_8N1, 16, 17);
delay(1000);// delay for lorawan power on
/* LoRaWAN Init */
Serial2.println(cmd_test_mode);
delay(500);
Serial2.println(cmd_rfconf);
delay(500);
Serial2.println(cmd_receive_data);
delay(500);
}
void loop() {
if(Serial2.available()) {
int ch = Serial2.read();
M5.Lcd.print((char)ch);
Serial.write(ch);
}
}
```
<!-- ## 回路図 -->
<!-- <img src="assets/img/product_pics/module/lorawan_sch.png"> -->
+42 -2
View File
@@ -4,7 +4,9 @@
***
: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/store/product/M5Stack-New-Arrival-PLUS-Module-Encoder-Module-with-MEGA328P-500mAh-Battery-ISP-IR-Transmitter-UART-GPIO/3226069_32949278724.html?spm=a2g1x.12024536.productList_5885013.pic_1)**
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[サンプルコード](#サンプルコード)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/store/product/M5Stack-New-Arrival-PLUS-Module-Encoder-Module-with-MEGA328P-500mAh-Battery-ISP-IR-Transmitter-UART-GPIO/3226069_32949278724.html?spm=a2g1x.12024536.productList_5885013.pic_1)**
<!-- :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/store/product/M5Stack-New-Arrival-PLUS-Module-Encoder-Module-with-MEGA328P-500mAh-Battery-ISP-IR-Transmitter-UART-GPIO/3226069_32949278724.html?spm=a2g1x.12024536.productList_5885013.pic_1)** -->
## 概要
@@ -28,11 +30,49 @@
- **[フォーラム](http://forum.m5stack.com/)**
- **[モジュール内のMEGA328ファームウェア](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/PLUS/firmware_328p)**
## サンプルコード
### 1. Arduino IDE
### 2. UIFlow
*以下のコードは不完全です(説明のためだけに). 完全なコードが必要な場合は、ここをクリックしてください[サンプルコード](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/PLUS/Arduino)`plus_read_encoder.ino`.*
```arduino
/*
* ギアポテンショメータのデータを読む
* 赤外線ライト
*/
#include <Arduino.h>
#include <M5Stack.h>
#define IrPin 13
#define PLUS_ADDR 0x62
// declaration
int32_t number = 0;
uint8_t press = 0;
// initialization
M5.begin(true, false, false);
Wire.begin();
ledcSetup(1, 38000, 10); ledcAttachPin(IrPin, 1);// IR Pin setting
// read data
Wire.requestFrom(PLUS_ADDR, 2);
while(Wire.available()) {
int8_t encode = Wire.read();
uint8_t press_n = Wire.read();
number += encode;
if(press_n == 0xff) {
press = 0;//encoder was pressed
}
else {
press = 1;//encoder was releaed
}
}
```
<!-- ## 回路図 -->
+52 -2
View File
@@ -4,7 +4,9 @@
***
: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/store/product/M5Stack-New-SERVO-Module-Board-12-Channels-Servo-Controller-with-MEGA328-Inside-Power-Adapter-6-24V/3226069_32951356502.html?spm=a2g1y.12024536.productList_5885011.pic_0)**
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[サンプルコード](#サンプルコード)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/store/product/M5Stack-New-SERVO-Module-Board-12-Channels-Servo-Controller-with-MEGA328-Inside-Power-Adapter-6-24V/3226069_32951356502.html?spm=a2g1y.12024536.productList_5885011.pic_0)**
<!-- :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/store/product/M5Stack-New-SERVO-Module-Board-12-Channels-Servo-Controller-with-MEGA328-Inside-Power-Adapter-6-24V/3226069_32951356502.html?spm=a2g1y.12024536.productList_5885011.pic_0)** -->
## 概要
@@ -38,11 +40,59 @@
- **[フォーラム](http://forum.m5stack.com/)**
- **[モジュール内のMEGA328ファームウェア](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/SERVO/firmware_328p)**
## サンプルコード
### 1. Arduino IDE
### 2. UIFlow
*例程下载请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/SERVO/Arduino)。*
```arduino
#include <Arduino.h>
#include <M5Stack.h>
#include <Wire.h>
#define SERVO_ADDR 0x53
void setup() {
M5.begin(true, false, true);
M5.Lcd.setTextFont(4);
M5.Lcd.setCursor(70, 100);
M5.Lcd.print("Servo Example");
Wire.begin(21, 22, 100000);
}
// addr 0x01 means "control the number 1 servo by us"
void Servo_write_us(uint8_t number, uint16_t us) {
Wire.beginTransmission(SERVO_ADDR);
Wire.write(0x00 | number);
Wire.write(us & 0x00ff);
Wire.write(us >> 8 & 0x00ff);
Wire.endTransmission();
}
// addr 0x11 means "control the number 1 servo by angle"
void Servo_write_angle(uint8_t number, uint8_t angle) {
Wire.beginTransmission(SERVO_ADDR);
Wire.write(0x10 | number);
Wire.write(angle);
Wire.endTransmission();
}
void loop() {
for(uint8_t i = 0; i < 12; i++){
Servo_write_us(i, 700);
// Servo_write_angle(i, 0);
}
delay(1000);
for(uint8_t i = 0; i < 12; i++){
Servo_write_us(i, 2300);
// Servo_write_angle(i, 180);
}
delay(1000);
}
```
<!-- ## 回路図 -->
+6 -4
View File
@@ -4,7 +4,9 @@
***
: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/store/product/M5Stack-Official-In-Stock-GSM-Module-SIM800L-Stackable-IoT-Development-Board-for-Arduino-ESP32-with-MIC/3226069_32843211923.html?spm=2114.12010615.8148356.20.25e96be7xE1y22.html)**
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/store/product/M5Stack-Official-In-Stock-GSM-Module-SIM800L-Stackable-IoT-Development-Board-for-Arduino-ESP32-with-MIC/3226069_32843211923.html?spm=2114.12010615.8148356.20.25e96be7xE1y22.html)**
<!-- :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/store/product/M5Stack-Official-In-Stock-GSM-Module-SIM800L-Stackable-IoT-Development-Board-for-Arduino-ESP32-with-MIC/3226069_32843211923.html?spm=2114.12010615.8148356.20.25e96be7xE1y22.html)** -->
## 概要
@@ -53,13 +55,13 @@ M5Stackシリーズのコアを使用し、Blockly、Arduino、MicroPythonでプ
- **[フォーラム](http://forum.m5stack.com/)**
- **データシート** - [SIM800L](http://simcomm2m.com/En/module/detail.aspx?id=138)(SIM800L)
<!-- - **データシート** - [SIM800L](http://simcomm2m.com/En/module/detail.aspx?id=138)(SIM800L) -->
## サンプルコード
<!-- ## サンプルコード
### 1. Arduino IDE
### 2. UIFlow
### 2. UIFlow -->
<!-- ## 回路図 -->
+44 -2
View File
@@ -1,12 +1,14 @@
# STEPMOTOR モジュール
<img src="assets/img/product_pics/module/module_stepmotor_01.png" width="30%" height="30%"> <img src="assets/img/product_pics/module/module_stepmotor_02.png" width="30%" height="30%"> <img src="assets/img/product_pics/module/module_stepmotor_03.png" width="30%" height="30%">
<img src="assets/img/product_pics/module/module_stepmotor_01.png" width="30%" height="30%"> <img src="assets/img/product_pics/module/module_stepmotor_02.png" width="30%" height="30%"> <img src="assets/img/product_pics/module/module_stepmotor_03.png" width="30%" height="30%">
<!-- <img src="assets/img/product_pics/module/module_stepmotor_04.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/store/product/M5Stack-New-Arrival-Stepmotor-Module-for-Arduino-ESP32-GRBL-12C-Step-Motor-MEGA328P-similar-as-12V/3226069_32889109142.html?spm=2114.12010612.8148356.17.50511b9b5ViNuz)**
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[サンプルコード](#サンプルコード)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://www.aliexpress.com/store/product/M5Stack-New-Arrival-Stepmotor-Module-for-Arduino-ESP32-GRBL-12C-Step-Motor-MEGA328P-similar-as-12V/3226069_32889109142.html?spm=2114.12010612.8148356.17.50511b9b5ViNuz)**
<!-- :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/store/product/M5Stack-New-Arrival-Stepmotor-Module-for-Arduino-ESP32-GRBL-12C-Step-Motor-MEGA328P-similar-as-12V/3226069_32889109142.html?spm=2114.12010612.8148356.17.50511b9b5ViNuz)** -->
## 概要
@@ -39,8 +41,48 @@
### 1. Arduino IDE
*以下のコードは不完全です(説明のためだけに). 完全なコードが必要な場合は、ここをクリックしてください[サンプルコード](https://github.com/m5stack/stepmotor_module/tree/master/Example/Arduino)。*
```adrduino
/*
If Button A was pressed,
stepmotor will rotate back and forth at a time
*/
#include <M5Stack.h>
#include <Wire.h>
#define STEPMOTOR_I2C_ADDR 0x70
// initialization
M5.begin();
Wire.begin();
// Controlling Protocol:
// G<n> X<distance>Y<distance>Z<distance> F<speed>
SendCommand(STEPMOTOR_I2C_ADDR, "G1 X20Y20Z20 F500");
SendCommand(STEPMOTOR_I2C_ADDR, "G1 X0Y0Z0 F400");
// Get Data from Module.
Wire.requestFrom(STEPMOTOR_I2C_ADDR, 1);
if (Wire.available() > 0) {
int u = Wire.read();
if (u != 0) Serial.write(u);
}
// Send Data to Module.
while (Serial.available() > 0) {
int inByte = Serial.read();
SendByte(STEPMOTOR_I2C_ADDR, inByte);
}
```
### 2. UIFlow
*特定のルーチンをクリックしてください[ルーチン](https://github.com/m5stack/stepmotor_module/tree/master/Example/UIFlow)。*
<img src="assets/img/product_pics/module/module_example/STEPMOTOR/example_module_stepmotor_01.png">
<!-- ## 回路図 -->
<!-- <img src="assets/img/product_pics/module/stepmotor_sch.png"> -->
+5 -3
View File
@@ -4,7 +4,9 @@
***
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[サンプルコード](#サンプルコード)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:electric_plug:**[回路図](#回路図)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.13.1dbd425eDUpt0Z&id=583599151180)**
:memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.13.1dbd425eDUpt0Z&id=583599151180)**
<!-- :memo:**[概要](#概要)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octocat:**[サンプルコード](#サンプルコード)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:electric_plug:**[回路図](#回路図)**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;🛒**[購入リンク](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.13.1dbd425eDUpt0Z&id=583599151180)** -->
## 概要
@@ -33,11 +35,11 @@
- **データシート** - [MAX3421E](https://www.sparkfun.com/datasheets/DevTools/Arduino/MAX3421E.pdf)
## サンプルコード
<!-- ## サンプルコード
### 1. Arduino IDE
### 2. UIFlow
### 2. UIFlow -->
<!-- ## 回路図 -->