mirror of
https://github.com/m5stack/m5-docs.git
synced 2026-05-20 10:23:01 -07:00
Merge branch 'master' of github.com:m5stack/m5-docs
This commit is contained in:
@@ -109,8 +109,9 @@
|
||||
<tr><td>ATOM Motion</td><td>PORT-B(Black)</td><td>PORT-C(Blue)</td></tr>
|
||||
</table>
|
||||
|
||||
## I2C register
|
||||
## Protocol
|
||||
|
||||
- Protocol type I2C
|
||||
- I2C Address: **0x38**
|
||||
|
||||
<table>
|
||||
|
||||
+31
-1
@@ -77,13 +77,43 @@ The Bugc base needs to be used in conjunction with the M5StickC controller. The
|
||||
|
||||
>2. After downloading the software, double-click to run the application, connect the M5 device to the computer through the data cable, select the port parameters, click **"Burn"** to burn the program (**For M5StickC, set the baud rate to 750000 or 115200**)
|
||||
|
||||
### 管脚映射
|
||||
## PinMap
|
||||
|
||||
<table>
|
||||
<tr><td>M5StickC</td><td>GPIO0</td><td>GPIO26</td><td>3.3V</td><td>GND</td><td>BAT</td></tr>
|
||||
<tr><td>BugC</td><td>SDA</td><td>SCL</td><td>3.3V</td><td>GND</td><td>BAT</td></tr>
|
||||
</table>
|
||||
|
||||
## Protocol
|
||||
|
||||
- Protocol type I2C
|
||||
- I2C Address: **0x38**
|
||||
|
||||
```clike
|
||||
/*--------------------------------------------------------------------------------------------------*/
|
||||
| MOTOR SPEED REG | 0x00
|
||||
| ------------------------------------------------------------------------------------------------
|
||||
| FRONT_LEFT_reg[0] | R/W | FRONT_LEFT SPEED
|
||||
| FRONT_RIGHT_reg[1] | R/W | FRONT_RIGHT SPEED
|
||||
| REAR_LEFT_reg[2] | R/W | REAR_LEFT SPEED
|
||||
| REAR_RIGHT_reg[2] | R/W | REAR_RIGHT SPEED
|
||||
/*----------------------------------------------------------------------------------------------------
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------*/
|
||||
| RGB LED COLOR REG | 0x10
|
||||
| ------------------------------------------------------------------------------------------------
|
||||
| left/right_reg[0] | R/W | left/right control
|
||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
| R | R | R | R | R | R | R | SELECT |
|
||||
| -SELECT: 0 FRONT_LEFT RGB LED
|
||||
| 1 FRONT_RIGHT RGB LED
|
||||
| rgb_r_reg[1] | R/W | RED value
|
||||
| rgb_g_reg[2] | R/W | Green value
|
||||
| rgb_b_reg[2] | R/W | Blue value
|
||||
/*----------------------------------------------------------------------------------------------------
|
||||
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
### 1. Arduino
|
||||
|
||||
@@ -103,6 +103,27 @@
|
||||
<tr><td>4-relay Unit</td><td>SDA</td><td>SCL</td><td>5V</td><td>GND</td></tr>
|
||||
</table>
|
||||
|
||||
## Protocol
|
||||
|
||||
- Protocol type I2C
|
||||
- I2C Address: **0x26**
|
||||
|
||||
```clike
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|RELAY control reg | 0x10
|
||||
|-----------------------------------------------------------------------------
|
||||
|Relay_ctrl_mode_reg[0] | R/W | System control
|
||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
| R | R | R | R | R | R | R | Sync Mode |
|
||||
| -Sync Mode:0 LED&Relay Async
|
||||
| -Sync Mode:1 LED&Relay Sync
|
||||
//---------------------------------------------------------------------------------
|
||||
|Relay_ctrl_mode_reg[1] | R/W | Relay & LED control
|
||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
| LED1| LED2| LED3| LED4| RLY1| RLY2| RLY3| RLY4|
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
### 1. Arduino
|
||||
|
||||
+37
-37
@@ -126,55 +126,55 @@ It supports deep sleep mode, which can reduce the power consumption in the idle
|
||||
<tr><td>DDS Unit</td><td>GPIO22</td><td>GPIO21</td><td>5V</td><td>GND</td></tr>
|
||||
</table>
|
||||
|
||||
## I2C register
|
||||
## Protocol
|
||||
|
||||
- Protocol type I2C
|
||||
- I2C Address: **0x31**
|
||||
|
||||
>When writing a register, the highest bit must be set to 1. The mclk is set to "1" by default, it will keep the last output signal magnitude. Once the DAC is set to 1, it stops the Unit output.
|
||||
|
||||
```
|
||||
/*------------------------------------------------ -------------------------------------------------- */
|
||||
// | DDS CTRL REG | 0x20
|
||||
// | ----------------------------------------------- -------------------------------------------------
|
||||
// | dds_ctrl_reg[0] | R/W | System control
|
||||
// | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
// | W | R | R | R | R | MODE |
|
||||
```clike
|
||||
/*--------------------------------------------------------------------------------------------------*/
|
||||
| DDS CTRL REG | 0x20
|
||||
| ------------------------------------------------------------------------------------------------
|
||||
| dds_ctrl_reg[0] | R/W | System control
|
||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
| W | R | R | R | R | MODE |
|
||||
|
||||
| -MODE: 000 Reserved
|
||||
| 001 SINUS
|
||||
| 010 TRIANGLE
|
||||
| 011 SQUARE
|
||||
| 100 SAWTOOTH
|
||||
| 101 DC
|
||||
//
|
||||
// | -MODE: 000 Reserved
|
||||
// | 001 SINUS
|
||||
// | 010 TRIANGLE
|
||||
// | 011 SQUARE
|
||||
// | 100 SAWTOOTH
|
||||
// | 101 DC
|
||||
//
|
||||
// | dds_ctrl_reg[1] | R/W | System control
|
||||
// | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
// | W | FSELECT | PSELECT | S01 | S12 | RSET | R | R |
|
||||
//
|
||||
// | -FSELECT: 0 Used FREQ0
|
||||
// 1 Used FREQ1
|
||||
// | -PSELECT: 0 Used PHASE0
|
||||
// 1 Used PHASE1
|
||||
// | -SLEEP01: 1 Disenable mclk
|
||||
// | -SLEEP12: 1 Disenable DAC
|
||||
/*------------------------------------------------ -------------------------------------------------- -
|
||||
| dds_ctrl_reg[1] | R/W | System control
|
||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
| W | FSELECT | PSELECT | S01 | S12 | RSET | R | R |
|
||||
|
||||
| -FSELECT: 0 Used FREQ0
|
||||
1 Used FREQ1
|
||||
| -PSELECT: 0 Used PHASE0
|
||||
1 Used PHASE1
|
||||
| -SLEEP01: 1 Disenable mclk
|
||||
| -SLEEP12: 1 Disenable DAC
|
||||
/*----------------------------------------------------------------------------------------------------
|
||||
|
||||
/*------------------------------------------------ -------------------------------------------------- */
|
||||
// | DDS FREQ PHASE REG | 0x30
|
||||
// | ----------------------------------------------- -------------------------------------------------
|
||||
// | dds_freq_phase_reg[0:3] | R/W | FREQ(28bit)
|
||||
// | 31 | 30 | 29:28 | 27:0 |
|
||||
// | W | N | R | freq reg 0 |
|
||||
/*--------------------------------------------------------------------------------------------------*/
|
||||
| DDS FREQ PHASE REG | 0x30
|
||||
| ------------------------------------------------------------------------------------------------
|
||||
| dds_freq_phase_reg[0:3] | R/W | FREQ(28bit)
|
||||
| 31 | 30 | 29:28 | 27:0 |
|
||||
| W | N | R | freq reg 0 |
|
||||
//
|
||||
// | dds_freq_phase_reg[4:5] | R/W | PHASE(12bit)
|
||||
// | 15 | 14 | 13:12 | 11:0 |
|
||||
// | W | N | R | phase reg 1 |
|
||||
| dds_freq_phase_reg[4:5] | R/W | PHASE(12bit)
|
||||
| 15 | 14 | 13:12 | 11:0 |
|
||||
| W | N | R | phase reg 1 |
|
||||
//
|
||||
/*------------------------------------------------ -------------------------------------------------- -*/
|
||||
/*---------------------------------------------------------------------------------------------------*/
|
||||
|
||||
```
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
var purchase_link = 'https://m5stack.com/products/dds-unit-ad9833';
|
||||
|
||||
@@ -112,8 +112,9 @@
|
||||
<tr><td>ATOM Motion</td><td>PORT-B(Black)</td><td>PORT-C(Blue)</td></tr>
|
||||
</table>
|
||||
|
||||
## I2C寄存器
|
||||
## 通讯协议
|
||||
|
||||
- 协议类型I2C
|
||||
- I2C Address: **0x38**
|
||||
|
||||
<table>
|
||||
|
||||
@@ -83,6 +83,38 @@ Bugc底座需要结合M5StickC控制器使用.在底座上,配备了四个由S
|
||||
<tr><td>BugC</td><td>SDA</td><td>SCL</td><td>3.3V</td><td>GND</td><td>BAT</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
## 通讯协议
|
||||
|
||||
- 协议类型I2C
|
||||
- I2C Address: **0x38**
|
||||
|
||||
```clike
|
||||
/*--------------------------------------------------------------------------------------------------*/
|
||||
| MOTOR SPEED REG | 0x00
|
||||
| ------------------------------------------------------------------------------------------------
|
||||
| FRONT_LEFT_reg[0] | R/W | FRONT_LEFT SPEED
|
||||
| FRONT_RIGHT_reg[1] | R/W | FRONT_RIGHT SPEED
|
||||
| REAR_LEFT_reg[2] | R/W | REAR_LEFT SPEED
|
||||
| REAR_RIGHT_reg[2] | R/W | REAR_RIGHT SPEED
|
||||
/*----------------------------------------------------------------------------------------------------
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------*/
|
||||
| RGB LED COLOR REG | 0x10
|
||||
| ------------------------------------------------------------------------------------------------
|
||||
| left/right_reg[0] | R/W | left/right control
|
||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
| R | R | R | R | R | R | R | SELECT |
|
||||
| -SELECT: 0 FRONT_LEFT RGB LED
|
||||
| 1 FRONT_RIGHT RGB LED
|
||||
| rgb_r_reg[1] | R/W | RED value
|
||||
| rgb_g_reg[2] | R/W | Green value
|
||||
| rgb_b_reg[2] | R/W | Blue value
|
||||
/*----------------------------------------------------------------------------------------------------
|
||||
|
||||
```
|
||||
|
||||
|
||||
## 案例程序
|
||||
|
||||
### 1. Arduino
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
## 产品特性
|
||||
|
||||
- Ai-Thinker Ra-07H模组方案
|
||||
- Ai-Thinker Ra-07模组方案
|
||||
- 工作频率:470MHz
|
||||
- SMA天线
|
||||
- 通信接口: UART
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
## CN470支持的主要国家及地区
|
||||
|
||||
**China**
|
||||
**中国**
|
||||
|
||||
## 规格参数
|
||||
|
||||
@@ -69,6 +69,13 @@
|
||||
<tr><td>SW DIP-6拨码开关</td><td>G17/G0/G13</td><td>G16/G5/G15</td></tr>
|
||||
</table>
|
||||
|
||||
## 主控兼容情况
|
||||
|
||||
<table>
|
||||
<tr><td>CORE</td><td>RX</td><td>TX</td></tr>
|
||||
<tr><td>SW DIP-6拨码开关</td><td>G17/G0/G13</td><td>G16/G5/G15</td></tr>
|
||||
</table>
|
||||
|
||||
?>**M5Stack FIRE** 中的 GPIO 16 / 17 默认与PSRAM连接,若该模块的TXD/RXD使用GPIO16,GPIO17将与其产生冲突。因此,当使用**M5Stack FIRE**去驱动该模块时,你需要将拨码开关拨至剩余两组引脚中的任意一组.
|
||||
|
||||
<img src="assets/img/product_pics/module/com_lorawan470/com.lorawan470_02.webp">
|
||||
@@ -87,7 +94,7 @@
|
||||
|
||||
## 案例程序
|
||||
|
||||
- [请点击此处获取Arduino示例程序](https://github.com/m5stack/M5Atom/tree/master/examples/ATOM_BASE/ATOM_Socket)
|
||||
- [请点击此处获取Arduino示例程序](https://github.com/m5stack/M5Stack/tree/master/examples/Modules/COM_LoRaWAN470)
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
## 案例程序
|
||||
|
||||
- [请点击此处获取Arduino示例程序](https://github.com/m5stack/M5Atom/tree/master/examples/ATOM_BASE/ATOM_Socket)
|
||||
- [请点击此处获取Arduino示例程序](https://github.com/m5stack/M5Stack/tree/master/examples/Modules/COM_LoRaWAN915)
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
@@ -104,6 +104,27 @@
|
||||
<tr><td>4-relay Unit</td><td>SDA</td><td>SCL</td><td>5V</td><td>GND</td></tr>
|
||||
</table>
|
||||
|
||||
## 通讯协议
|
||||
|
||||
- 协议类型I2C
|
||||
- I2C Address: **0x26**
|
||||
|
||||
```clike
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|RELAY control reg | 0x10
|
||||
|-----------------------------------------------------------------------------
|
||||
|Relay_ctrl_mode_reg[0] | R/W | System control
|
||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
| R | R | R | R | R | R | R | Sync Mode |
|
||||
| -Sync Mode:0 LED&Relay Async
|
||||
| -Sync Mode:1 LED&Relay Sync
|
||||
//---------------------------------------------------------------------------------
|
||||
|Relay_ctrl_mode_reg[1] | R/W | Relay & LED control
|
||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
| LED1| LED2| LED3| LED4| RLY1| RLY2| RLY3| RLY4|
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
```
|
||||
|
||||
## 案例程序
|
||||
|
||||
### 1. Arduino
|
||||
|
||||
+32
-32
@@ -126,53 +126,53 @@
|
||||
<tr><td>DDS Unit</td><td>GPIO22</td><td>GPIO21</td><td>5V</td><td>GND</td></tr>
|
||||
</table>
|
||||
|
||||
## I2C寄存器
|
||||
## 通讯协议
|
||||
|
||||
- 协议类型I2C
|
||||
- I2C Address: **0x31**
|
||||
|
||||
>写寄存器时,需要将最高位置1。mclk置1将保持输出最后一个信号幅值,DAC置1将停止Unit输出。
|
||||
|
||||
```clike
|
||||
/*--------------------------------------------------------------------------------------------------*/
|
||||
// | DDS CTRL REG | 0x20
|
||||
// | ------------------------------------------------------------------------------------------------
|
||||
// | dds_ctrl_reg[0] | R/W | System control
|
||||
// | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
// | W | R | R | R | R | MODE |
|
||||
//
|
||||
// | -MODE: 000 Reserved
|
||||
// | 001 SINUS
|
||||
// | 010 TRIANGLE
|
||||
// | 011 SQUARE
|
||||
// | 100 SAWTOOTH
|
||||
// | 101 DC
|
||||
| DDS CTRL REG | 0x20
|
||||
| ------------------------------------------------------------------------------------------------
|
||||
| dds_ctrl_reg[0] | R/W | System control
|
||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
| W | R | R | R | R | MODE |
|
||||
|
||||
| -MODE: 000 Reserved
|
||||
| 001 SINUS
|
||||
| 010 TRIANGLE
|
||||
| 011 SQUARE
|
||||
| 100 SAWTOOTH
|
||||
| 101 DC
|
||||
//
|
||||
// | dds_ctrl_reg[1] | R/W | System control
|
||||
// | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
// | W | FSELECT | PSELECT | S01 | S12 | RSET | R | R |
|
||||
//
|
||||
// | -FSELECT: 0 Used FREQ0
|
||||
// 1 Used FREQ1
|
||||
// | -PSELECT: 0 Used PHASE0
|
||||
// 1 Used PHASE1
|
||||
// | -SLEEP01: 1 Disenable mclk
|
||||
// | -SLEEP12: 1 Disenable DAC
|
||||
| dds_ctrl_reg[1] | R/W | System control
|
||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
| W | FSELECT | PSELECT | S01 | S12 | RSET | R | R |
|
||||
|
||||
| -FSELECT: 0 Used FREQ0
|
||||
1 Used FREQ1
|
||||
| -PSELECT: 0 Used PHASE0
|
||||
1 Used PHASE1
|
||||
| -SLEEP01: 1 Disenable mclk
|
||||
| -SLEEP12: 1 Disenable DAC
|
||||
/*----------------------------------------------------------------------------------------------------
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------*/
|
||||
// | DDS FREQ PHASE REG | 0x30
|
||||
// | ------------------------------------------------------------------------------------------------
|
||||
// | dds_freq_phase_reg[0:3] | R/W | FREQ(28bit)
|
||||
// | 31 | 30 | 29:28 | 27:0 |
|
||||
// | W | N | R | freq reg 0 |
|
||||
| DDS FREQ PHASE REG | 0x30
|
||||
| ------------------------------------------------------------------------------------------------
|
||||
| dds_freq_phase_reg[0:3] | R/W | FREQ(28bit)
|
||||
| 31 | 30 | 29:28 | 27:0 |
|
||||
| W | N | R | freq reg 0 |
|
||||
//
|
||||
// | dds_freq_phase_reg[4:5] | R/W | PHASE(12bit)
|
||||
// | 15 | 14 | 13:12 | 11:0 |
|
||||
// | W | N | R | phase reg 1 |
|
||||
| dds_freq_phase_reg[4:5] | R/W | PHASE(12bit)
|
||||
| 15 | 14 | 13:12 | 11:0 |
|
||||
| W | N | R | phase reg 1 |
|
||||
//
|
||||
/*---------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
```
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user