Peripheral Configuration
Peripheral Configuration
This guide consolidates all peripheral configuration topics including peripheral types, pin assignment, parameter settings, Web configuration steps, and automation examples.
Before choosing a module, check: Supported Modules and Sensors.
Table of Contents
- Overview
- 1. GPIO and PWM Peripherals
- 2. Motor Control Peripherals
- 3. Display Devices
- 4. Temperature/Humidity Sensors
- 5. Environment Sensors
- 6. Electrical Sensors
- 7. Communication Devices
- 8. Other Peripherals
- Pin Assignment Guidelines
- Web Configuration Workflow
- FAQ
Overview
FastBee supports 25+ peripheral types, configured visually through the Web interface with no coding required.
The peripheral page abstracts real hardware into objects that rules can reference. When adding a new peripheral, choose the type first, then fill in pins and parameters; keep it disabled on first save, then enable after confirming wiring.


When selecting a type, first determine the signal category: digital signals use GPIO, analog signals use ADC, bus devices use I2C/SPI/UART, RS485 slaves use Modbus sub-devices, and display peripherals start with static text.
Peripheral Type Quick Reference
| Type | Name | Description | Detail Doc |
|---|---|---|---|
| 11 | GPIO_DIGITAL_INPUT | Digital input | gpio-input.md |
| 12 | GPIO_DIGITAL_OUTPUT | Digital output | gpio-output.md |
| 13 | GPIO_DIGITAL_INPUT_PULLUP | Pull-up input (button) | gpio-input.md |
| 15 | GPIO_ANALOG_INPUT | ADC analog input | adc-input.md |
| 17 | GPIO_PWM_OUTPUT | PWM output | pwm-output.md |
| 36 | LCD | Display (SSD1306/SH1106) | oled-usage-guide.md |
| 38 | SENSOR | Sensor (DHT/DS18B20 etc.) | See individual sensor docs |
| 41 | PWM_SERVO | Servo | servo.md |
| 42 | STEPPER_MOTOR | Stepper motor | stepper-motor.md |
| 43 | ENCODER | Rotary encoder | encoder.md |
| 44 | ONE_WIRE | 1-Wire (DS18B20) | sensor-ds18b20.md |
| 45 | NEO_PIXEL | WS2812B RGB strip | neopixel.md |
| 47 | SEVEN_SEGMENT_TM1637 | TM1637 digital tube | display-tm1637.md |
| 51 | MODBUS_DEVICE | Modbus slave device | modbus-device.md |
1. GPIO and PWM Peripherals
1.1 GPIO Output (type:12)
Use cases: LED, relay, buzzer, laser sensor
Detail: gpio-output.md
JSON config:
{
"id": "led_01",
"name": "LED Indicator",
"type": 12,
"enabled": true,
"pinCount": 1,
"pins": [26, 255, 255, 255, 255, 255, 255, 255],
"params": {
"initialState": 0
}
}1.2 GPIO Input (type:11/13/14)
Use cases: Button, PIR motion sensor, vibration sensor, reed switch
Detail: gpio-input.md
1.3 ADC Input (type:15/26)
Use cases: Photoresistor, soil moisture, smoke, rain drop, voltage, current sensors
Detail: adc-input.md
1.4 PWM Output (type:17)
Use cases: LED dimming, motor speed control, servo
Detail: pwm-output.md
2. Motor Control Peripherals
2.1 Servo (type:41)
Detail: servo.md
2.2 Stepper Motor (type:42)
Detail: stepper-motor.md
3. Display Devices
3.1 OLED Display (type:36, SSD1306/SH1106)
Detail: oled-usage-guide.md
3.2 TM1637 Digital Tube (type:47)
Detail: display-tm1637.md
3.3 LCD1602 (type:36, PCF8574 I2C)
Detail: display-lcd1602.md
4. Temperature/Humidity Sensors
4.1 DHT11/DHT22 (type:38)
Detail: sensor-dht.md
4.2 DS18B20 (type:44, 1-Wire)
Detail: sensor-ds18b20.md
5. Environment Sensors
5.1 SHT31 (type:38, I2C)
Detail: sensor-sht31.md
5.2 AHT20 (type:38, I2C)
Detail: sensor-aht20.md
5.3 BH1750 Illuminance (type:38, I2C)
Detail: sensor-bh1750.md
5.4 BMP280 Pressure (type:38, I2C, Standard/Full)
Detail: sensor-bmp280.md
5.5 MPU6050 Gyroscope (type:38, I2C, Standard/Full)
Detail: sensor-mpu6050.md
5.6 HC-SR04 Ultrasonic (type:38)
Detail: sensor-ultrasonic.md
6. Electrical Sensors
6.1 Voltage Sensor (type:15, ADC with divider)
Detail: sensor-voltage.md
6.2 Current Sensor — ACS712 (type:15, ADC)
Detail: sensor-current.md
7. Communication Devices
7.1 Modbus Sub-Device (type:51, Standard/Full)
Detail: modbus-device.md
7.2 IR Remote (Standard/Full)
Detail: ir-remote.md
7.3 RFID MFRC522 (SPI, Standard/Full)
Detail: rfid-mfrc522.md
8. Other Peripherals
8.1 NeoPixel WS2812B (type:45)
Detail: neopixel.md
8.2 Rotary Encoder (type:43)
Detail: encoder.md
8.3 SD Card (type:37)
Detail: storage-sd-card.md
8.4 Device Event (type:60)
Detail: device-event.md
Pin Assignment Guidelines
- GPIO34-39: Input only—suitable for ADC/digital input
- GPIO6-11: Connected to Flash—not recommended for use
- GPIO32-39: ADC1—usable while WiFi is active (preferred)
- GPIO4,12-15,25-27: ADC2—unavailable while WiFi is active
- GPIO0: BOOT button—use with caution
- GPIO5: STATE LED—occupied by default
Web Configuration Workflow
- Open the Peripheral Configuration page in the Web console.
- Click Add Peripheral.
- Select the type, fill in the peripheral ID, name, and pin assignments.
- Keep
enabled: falseon first save. - After confirming wiring and power, enable the peripheral and save all.
If a peripheral saves successfully but does not take effect, verify that the Web form, peripherals.json, runtime driver, and rule references all use the same peripheral ID.
FAQ
| Issue | Check |
|---|---|
| Peripheral shows in list but no action | Is it enabled? Are pins correct? Is the relay active level inverted? |
| I2C sensor init fails | SDA/SCL swapped? Correct address? Pull-up resistors present? 3.3 V supply? |
| ADC value abnormal | Exceeds 3.3 V? Needs voltage divider? Attenuation and calibration correct? |
| Sensor reads empty | Is the collection rule enabled? Does periphId exist? Sampling interval too short? |
For the full Chinese source page, see 外设配置.
