Welcome to DFRobot: www.DFRobot.com.cn 38 / 49
Code analysis
The project mainly uses library file of BME280. Although there is no operation to the underlying of
SPI, SPI of FireBeetle Board-ESP32 is fully compliant with Arduino.
#define BME_CS D2
Different from Arduino, the setting of pin to SPI should transmit D2 not 2. What is more, D2, the SS
dial switch of FireBeetle Covers-Gravity Adapter Board should be gated. And BME280 should be
connected to SPI interface of FireBeetle Covers-Gravity Adapter Board by Dupont line, shown as
below.