lyusupov / SoftRF

:airplane: Multi-functional, compatible DIY general aviation proximity awareness system
GNU General Public License v3.0
759 stars 214 forks source link

Can T-Beam connect to BMP280? #32

Closed LilyGO closed 6 years ago

LilyGO commented 6 years ago

As the title. If the program has extended the BMP280 function, the connection pin is 21 and 22.

lyusupov commented 6 years ago

This is valid for T-Beam board with h/w rev. t22_v05 or higher only!  1

Effective from version 1.0-RC5, SoftRF firmware has (not announced yet) support for two I2C buses on TTGO T-Beam (v05+).

Pin numbers are:

// 1st I2C bus on the T-Beam v05+
#define SOC_GPIO_PIN_TBEAM_SDA  13
#define SOC_GPIO_PIN_TBEAM_SCL  2

// Hardware pin definitions for TTGO V2 Board with OLED SSD1306 0,96" I2C Display
#define TTGO_V2_OLED_PIN_RST  U8X8_PIN_NONE // connected to CPU RST/EN
#define TTGO_V2_OLED_PIN_SDA  21
#define TTGO_V2_OLED_PIN_SCL  22

Barometric pressure sensor is allowed on either:

OLED is allowed on 2nd I2C bus (21/22) only.

Because of the GPIO2 is one of the ESP32 "strapping" pins, 1st bus has one hardware design limitation, see this ticket for more details.

Recommendations:

1) If the BMP280 module is the only I2C device to be connected - wire it to 2nd bus (21/22) 2) if the OLED module is the only I2C device to be connected - wire it to 2nd bus (21/22) 3) if you need to have both BMP280 and OLED:

tbeam-bmp

p80825-143440

p80825-143025

LilyGO commented 6 years ago

Thank you very much