Terminal Block Board for FireBeetle 2 ESP32 Wiki - DFRobot

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

Specification

Board Information

Dimension

Dimension

Overview

Board 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
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

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);                      
}

Download codes into FireBeetle 2, then the LED for D0 will blink.

2 Analog Port

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

Function: Get the analog sensor readings via A0.

void setup() {
  Serial.begin(9600);
}

void loop() {
  int sensorValue = analogRead(A0);
  Serial.println(sensorValue);
  delay(20);        
}

Serial print the values read from A0.

Result 1

3. I2C Port

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

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("----------------------------------------");
}

Print the sensor data on the serial monitor.

Result 2

4. GDI

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);
}

The screen shows the words "你好" in blue.

Result 4

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents