Introduction
This expansion shield for FireBeetle 2 is just right for makers who love using terminal block for wiring up their projects!
Compared with the previous FireBeetle shields, it comes with additional 7-24V external voltage input and GDI port, and adopts terminal blocks to secure wires so as to make connections more stable and reliable. Each terminal block (except GND) has an LED for status indication. Since these LEDs also consume power, which leads to higher power consumption, an LED switch is designed on the board to allow users to turn off the LED when not required.
This expansion board is not compatible with FireBeetle ESP32-S3 and FireBeetle M0
Features
- Terminal block, more stable and reliable connections
- All pins of mainboard broken out
- External Voltage Input: 7-24V
- GDI for connecting display
- Clear colorful silkscreen
- Terminal block status indicator
- Terminal block status indicator switch
Specification
- External Voltage Input: 7-24V
- Screen Port: GDI
- 5V Port x3
- 3.3V Port x3
- GND Port x6
- Digital Port x12
- Analog Port x5
- I2C x3
- SPI x1
- Port Indicator x34
- Port Indicator Color: blue, red
- Default ON Port Indicator: 5V, 3.3V, D0, D1, D5, D6, A4, RST
- Dimension: 61×93.5mm/2.40×3.68"
Board Information
Dimension
Overview
Name | Function | Remark |
---|---|---|
FireBeetle Female Pin Socket | Connect FireBeetle 2 | |
GDI | Connect screen with GDI port | |
Onboard LED Switch | Control all terminal block status indicators | |
VIN Indicator | LED turns on when there is power input on VIN port | Red |
VIN Input Terminal Block | Connect 7-24V external power | |
Terminal Block | Extend all ports of FireBeetle to terminal blocks with more stable connections | |
Terminal Block Indicator | Each terminal has an LED for indicating level status | Power:red, GPIO: blue |
- GDI Wiring Sequence
FPC PINS | FireBeetle ESP32 PINS | Description |
---|---|---|
VCC | 3V3 | 3.3V |
BLK(PWM) | 12/D13 | Backlit |
GND | GND | GND |
SCLK | 18/SCK | SPI Clock |
MOSI | 23/MOSI | Master output, slave input |
MISO | 19/MISO | Master input, slave output |
DC | 25/D2 | Data/Command |
RES | 26/D3 | Reset |
CS | 14/D6 | TFT chip-select |
SDCS | 13/D7 | SD card chip-select |
FCS | 0/D5 | Font Library |
TCS | 4/D12 | Touch |
SCL | 22/SCL | I2C clock |
SDA | 21/SDA | I2C data |
INT | 16/D11 | INT |
BUSY-TE | 17/D10 | Tear-proof pin |
GPIO1 | 1/TXD | GPIO |
GPIO2 | 2/D9 | GPIO |
Tutorial
1 Digital Port
- Blink Example Code
This example use Blink code to show the level change of the port.
int LED=D0;
void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, HIGH);
delay(1000);
digitalWrite(LED, LOW);
delay(1000);
}
- Result
Download codes into FireBeetle 2, then the LED for D0 will blink.
2 Analog Port
Requirements
- Analog Rotation Potentiometer Sensor x 1
- FireBeetle 2 Terminal Block x 1
- FireBeetle 2 x 1
- Connection Diagram
Description:
FireBeete 2 Terminal Shield: 3.3V to Analog Rotation Potentiometer Sensor: P3
FireBeete 2 Terminal Shield: GND to Analog Rotation Potentiometer Sensor: P2
FireBeete 2 Terminal Shield: A0 to Analog Rotation Potentiometer Sensor: P1
- Sample Code
Function: Get the analog sensor readings via A0.
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(A0);
Serial.println(sensorValue);
delay(20);
}
- Result
Serial print the values read from A0.
3. I2C Port
Requirements
- SHT40 Temperature & Humidity Sensor x 1
- FireBeetle 2 Terminal Block x 1
- FireBeetle 2 x 1
- Connection Diagram
Description:
FireBeete 2 Terminal Shield: VCC to SHT40 VCC
FireBeete 2 Terminal Shield: GND to SHT40 GND
FireBeete 2 Terminal Shield: SCL to SHT40 SCL
FireBeete 2 Terminal Shield: SDA to SHT40 SDA
- Sample Code
Function: Get the ambient temperature and humidity using SHT40 to domenstrate I2C function.
#include"DFRobot_SHT40.h"
DFRobot_SHT40 SHT40(SHT40_AD1B_IIC_ADDR);
uint32_t id = 0;
float temperature, humidity;
void setup() {
Serial.begin(9600);
SHT40.begin();
while((id = SHT40.getDeviceID()) == 0){
Serial.println("ID retrieval error, please check whether the device is connected correctly!!!");
delay(1000);
}
delay(1000);
Serial.print("id :0x"); Serial.println(id, HEX);
}
void loop() {
temperature = SHT40.getTemperature(/*mode = */PRECISION_HIGH);
humidity = SHT40.getHumidity(/*mode = */PRECISION_HIGH);
if(temperature == MODE_ERR){
Serial.println("Incorrect mode configuration to get temperature");
} else{
Serial.print("Temperature :"); Serial.print(temperature); Serial.println(" C");
}
if(humidity == MODE_ERR){
Serial.println("The mode for getting humidity was misconfigured");
} else{
Serial.print("Humidity :"); Serial.print(humidity); Serial.println(" %RH");
}
if(humidity > 80){
SHT40.enHeater(/*mode = */POWER_CONSUMPTION_H_HEATER_1S);
}
delay(1000);
Serial.println("----------------------------------------");
}
- Result
Print the sensor data on the serial monitor.
4. GDI
Requirements
- 1.8inch 128x160 IPS TFT LCD Display x 1
- FireBeetle 2 Terminal Block x 1
- FireBeetle 2 x 1
- Connection
- Sample Code
Function: display "你好" on the screen with GDI to domenstrate GDI function.
#include "DFRobot_GDL.h"
DFRobot_ST7735_128x160_HW_SPI screen(/*dc=*/TFT_DC,/*cs=*/TFT_CS,/*rst=*/TFT_RST);
void setup() {
Serial.begin(115200);
screen.begin();
}
void loop() {
screen.setTextSize(4);
screen.fillScreen(COLOR_RGB565_BLACK);
screen.setFont(&SIMKAIFont12pt);
screen.setCursor(/*x=*/10,/*y=*/120);
screen.setTextColor(COLOR_RGB565_BLUE);
screen.setTextWrap(true);
screen.print("你好");
delay(2000);
}
- Result
The screen shows the words "你好" in blue.
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.