mirror of
https://github.com/m5stack/m5-docs.git
synced 2026-05-20 10:23:01 -07:00
...
This commit is contained in:
@@ -1,72 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
# Unit RELAY
|
||||
|
||||
<img src="assets/img/product_pics/unit/M5GO_Unit_relay.png" width="30%" height="30%"><img src="assets/img/product_pics/unit/unit_relay_grove_b.png" width="30%" height="30%">
|
||||
|
||||
***
|
||||
|
||||
:memo:**[Description](#Description)** :octocat:**[Example](#Example)** :electric_plug:**[Schematic](#Schematic)** 🛒**[Purchase](https://www.aliexpress.com/store/product/M5Stack-Official-Mini-Relay-Unit-DC-3A-30V-AC-3A-220V-with-Triode-Driven-GROVE-Port/3226069_32922856211.html?spm=a2g1y.12024536.productList_5885013.subject_24)** :clapper:**[Related Video](#Related-Video)**
|
||||
|
||||
## Description
|
||||
|
||||
The Unit relay is a unit that allows you to control large power loads with a light-current, safe, reliable power control system. the large power loads you can safely control is up to 24 VDC or 120 VAC.
|
||||
Only a low electrial level is sent to this unit, the relay will be close and the large power loads you want to control will be working.
|
||||
|
||||
|
||||
## Feature
|
||||
- A single input
|
||||
- Up to 3A @ 24 VDC or 120 VAC
|
||||
- GROVE interface, support [UiFlow](http://flow.m5stack.com) and [Arduino](http://www.arduino.cc)
|
||||
- Two Lego installation holes
|
||||
|
||||
## APPLICATION
|
||||
|
||||
- Be perfect for large inductive loads(like DC motors electrocircuit, intelligent interpolation...)
|
||||
- Control a standard wall outlet device
|
||||
|
||||
## Related Link
|
||||
|
||||
- **[Offical Video](https://www.youtube.com/channel/UCozgFVglWYQXbvTmGyS739w)**
|
||||
|
||||
- **[Forum](http://forum.m5stack.com/)**
|
||||
|
||||
## Example
|
||||
|
||||
### 1. Arduino IDE
|
||||
|
||||
```arduino
|
||||
// RELAY is connected to GROVE B
|
||||
pinMode(26, OUTPUT);
|
||||
|
||||
digitalWrite(26, 0);//relay opened
|
||||
delay(1000);
|
||||
digitalWrite(26, 1);//relay closed
|
||||
delay(1000);
|
||||
```
|
||||
|
||||
Click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/RELAY/Arduino) for Specific example.
|
||||
|
||||
### 2. UIFlow
|
||||
|
||||
<img src="assets/img/product_pics/unit/unit_example/RELAY/example_unit_relay_01.png">
|
||||
|
||||
Click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/RELAY/UIFlow) for Specific example.
|
||||
|
||||
## Schematic
|
||||
|
||||
<img src="assets/img/product_pics/unit/relay_sch.JPG">
|
||||
|
||||
### PinMap
|
||||
|
||||
<table>
|
||||
<tr><td>M5Core(GROVE B)</td><td>GPIO36</td><td>GPIO26</td><td>5V</td><td>GND</td></tr>
|
||||
<tr><td>RELAY Unit</td><td> </td><td>RELAY Pin</td><td>5V</td><td>GND</td></tr>
|
||||
</table>
|
||||
|
||||
## Related Video
|
||||
|
||||
<iframe height=498 width=510 src='https://player.youku.com/embed/XMzg5MjA2MDQxNg==' frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
=======
|
||||
# Unit RELAY
|
||||
|
||||
<img src="assets/img/product_pics/unit/M5GO_Unit_relay.png" width="30%" height="30%"><img src="assets/img/product_pics/unit/unit_relay_grove_b.png" width="30%" height="30%">
|
||||
@@ -134,4 +65,3 @@ Click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/
|
||||
## Related Video
|
||||
|
||||
<iframe height=498 width=510 src='https://player.youku.com/embed/XMzg5MjA2MDQxNg==' frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
>>>>>>> a510811d6b730443e6048277dfa387894101c476
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
***
|
||||
|
||||
: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:**[例程](#例程)** 🛒**[购买链接](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)** -->
|
||||
|
||||
## 描述
|
||||
|
||||
@@ -46,3 +48,20 @@ COMMU模块中的TTL接口,实际上是串口接口,默认连接的是串口
|
||||
- **[官方论坛](http://forum.m5stack.com/)**
|
||||
|
||||
## 例程
|
||||
|
||||
### Arduino IDE
|
||||
|
||||
```arduino
|
||||
/*
|
||||
Master.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
|
||||
|
||||
```
|
||||
|
||||
具体例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/LORAWAN/Arduino)。
|
||||
@@ -41,7 +41,7 @@ GPS Module内部默认是通过UART2(GPIO16, GPIO17)与M5Core通讯,你可以
|
||||
|
||||
### Arduino IDE
|
||||
|
||||
```c++
|
||||
```arduino
|
||||
#include <M5Stack.h>
|
||||
|
||||
/* By default, GPS is connected with M5Core through UART2 */
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
|
||||
## 描述
|
||||
|
||||
<mark>LoRaWAN</mark>是一个内置了LoRaWAN模块的M5模块,LoRaWAN模块主要由LoRa芯片(SX1276)和ST的MCU组成,集成了完整的LoRa协议栈。 所以,在使用这个高集成度模块的时候,你可以直接将它与M5Core堆叠,通过串口发送AT命令就可以开发它,比如配置串口信息、配置射频信息(频率、带宽、发送功率等)、发送信息的内容等等。
|
||||
<mark>LoRaWAN</mark>是一个内置了LoRaWAN模块的M5模块,LoRaWAN模块主要由LoRa芯片(SX1276)和ST的MCU组成,集成了完整的LoRa协议栈。 所以,在使用这个高集成度模块的时候,你可以直接将它与M5Core堆叠,通过串口发送**AT命令**就可以开发它,比如配置串口信息、配置射频信息(频率、带宽、发送功率等)、发送信息的内容等等。
|
||||
|
||||
LoRaWAN默认的串口配置:
|
||||
LoRaWAN**默认的串口配置:**
|
||||
波特率:9600;8位数据位;无奇偶校验;1位停止位。
|
||||
|
||||
?> **注意** 丝印"LoRaWAN"底下的5个孔是专门预留用于升级LoRaWAN模块固件。
|
||||
?> 丝印"LoRaWAN"底下的5个孔是专门预留用于升级LoRaWAN模块固件。
|
||||
|
||||
## 特性
|
||||
|
||||
@@ -37,8 +37,8 @@ LoRaWAN默认的串口配置:
|
||||
|
||||
| *RHF76-052_UART* | *ESP32 Chip* |
|
||||
| :----------: |:------------: |
|
||||
| RXD | GPIO17 |
|
||||
| TXD | GPIO16 |
|
||||
| RXD | U2TXD(GPIO17) |
|
||||
| TXD | U2RXD(GPIO16) |
|
||||
|
||||
## 相关链接
|
||||
|
||||
@@ -52,9 +52,11 @@ LoRaWAN默认的串口配置:
|
||||
|
||||
## 例程
|
||||
|
||||
### Arduino IDE
|
||||
|
||||
这是主从LORA模块点对点通信的例程,模块与M5Core之间通过AT指令通讯。
|
||||
|
||||
```c++
|
||||
```arduino
|
||||
/*
|
||||
Master.ino
|
||||
*/
|
||||
@@ -90,7 +92,7 @@ void loop() {
|
||||
}
|
||||
```
|
||||
|
||||
```c++
|
||||
```arduino
|
||||
/*
|
||||
Slaver.ino
|
||||
*/
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
|
||||
***
|
||||
|
||||
:memo:**[描述](#描述)** :octocat:**[例程](#例程)** :electric_plug:**[原理图](#原理图)** 🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.10.1c03425emPA4gi&id=559726007780)**
|
||||
:memo:**[描述](#描述)** :octocat:**[例程](#例程)** 🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.10.1c03425emPA4gi&id=559726007780)**
|
||||
|
||||
<!-- :memo:**[描述](#描述)** :octocat:**[例程](#例程)** :electric_plug:**[原理图](#原理图)** 🛒**[购买链接](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-1172588106.10.1c03425emPA4gi&id=559726007780)** -->
|
||||
|
||||
## 描述
|
||||
|
||||
SIM800L模块是一款内置了SIM800L GSM/GPRS小模块的M5Stack可堆叠模块堆叠了M5Core之后,你可以用UiFlow、Arduino和MicroPython来编程它。
|
||||
<mark>SIM800L</mark>模块是一款内置了SIM800L GSM/GPRS小模块的M5Stack可堆叠模块堆叠了M5Core之后,你可以用Arduino来编程它。
|
||||
|
||||
SIM800L是完整的支持四种频宽的GSM/GPRS解决方案。通过串口发送AT支持来控制SIM800模块
|
||||
|
||||
@@ -53,9 +55,9 @@ SIM800L是完整的支持四种频宽的GSM/GPRS解决方案。通过串口发
|
||||
|
||||
## 例程
|
||||
|
||||
### 1. Arduino IDE
|
||||
### Arduino IDE
|
||||
|
||||
这是通过串口显示终端发送命令来实现SIM800模块发短信的例程。
|
||||
<!-- 这是通过串口显示终端发送命令来实现SIM800模块发短信的例程。
|
||||
|
||||
```arduino
|
||||
/*
|
||||
@@ -70,6 +72,6 @@ Serial2.print("AT+Mode=Test");
|
||||
Serial2.print("AT+TEST=RFCFG,472.3,8,250,8,8,20");
|
||||
//send data as HEX format
|
||||
Serial2.print("AT+TEST=TXLRPKT,"00 00 01 00 00 AF 80 07 02 00 00 39"");
|
||||
```
|
||||
``` -->
|
||||
|
||||
## 原理图
|
||||
<!-- ## 原理图 -->
|
||||
Reference in New Issue
Block a user