# ESP32 Modbus Monitoring and Control

***

## FastBee IoT Terminal

<p align="center">
  <img src="../../../../device/v2/images/hardware/device.png" alt="FastBee IoT Terminal"/>
</p>

### Core Specifications

| Parameter | Description |
|-----------|-------------|
| Chip | ESP32-WROOM-32U |
| CPU | Dual-core Xtensa LX6 @ 240 MHz |
| Flash | 4 MB SPI Flash |
| SRAM | 520 KB |
| Wireless | WiFi 802.11 b/g/n + Bluetooth 4.2 + BLE |
| Supply Voltage | DC 9-36V |
| Features | External antenna, USB flash port, configuration button |

### Terminal Block Description

| Terminal | Function | Pin |
|----------|----------|-----|
| A/L | RS485-A (TX) | GPIO17 |
| B/H | RS485-B (RX) | GPIO16 |
| VCC | Power positive | DC 9-36V |
| GND | Power negative | — |
| DGND | Digital ground (isolated GND) | — |
| EGND | Protective ground (connects to device enclosure) | — |
| IO/L | Isolated digital I/O low-side | GPIO21 |
| IO/H | Isolated digital I/O high-side | GPIO22 |

### LEDs and Buttons

| Name | Type | Description |
|------|------|-------------|
| POWER | LED | Power indicator, steady on means power is normal |
| STATE | LED (GPIO5) | Status indicator, lights up on low level |
| DATA | LED | Communication indicator, blinks during data TX/RX |
| BOOT | Button (GPIO0) | Long press to enter configuration mode |

### Recommended PlatformIO Environment

Select the environment matching the board's chip, Flash and PSRAM. MQTT, Modbus RTU and GPIO isolated I/O also require their runtime features and valid wiring.

After flashing, you can confirm the terminal online status, IP, WiFi, memory usage and uptime via the Web console.

![Device Monitoring Dashboard](https://www.fastbee.cn/doc/assets/fastbee-dashboard.Bx7Lollz.png)

```powershell
powershell -ExecutionPolicy Bypass -File scripts\deploy.ps1 -Env esp32 -Port COM6
```

### Typical Application Scenarios

* **Industrial Acquisition Gateway**: Connect Modbus RTU slave devices via RS485, acquire temperature/humidity, meter data and report to the platform
* **Remote Control Terminal**: Isolated IO terminals control relays, solenoid valves and other actuators
* **Field Monitoring Node**: Wide voltage supply (9-36V) suitable for outdoor or industrial site deployment

***

## More Hardware

Welcome to submit your hardware adaptation cases. When submitting a PR, please include:

1. Hardware photos
2. Core specification table
3. Pin mapping description
4. Recommended PlatformIO environment and configuration
