manterolat/argo2-tracker

BME280 using I2C instead of SPI in Teensy tracker

manterolat opened this issue · 1 comments

Tracker program initializes BME280 sensor through I2C rather than SPI when using Teensy.

The tracker PCB connects pins required for SPI to the BME280, not the I2C SCL and SDA pins.
This means that all tracker programs since the initial commit will fail to initialize the BME280 and stop execution.

Can be fixed by changing the Adafruit BME280 library initialization/constructor to use SPI.

I2C Initialization (won't work without external wiring):

Adafruit_BME280 bme;

SPI Initialization (works with Teensy, not Feather M0):

Adafruit_BME280 bme(BME_CS);

Note: the Feather M0 has problems with SPI Transactions, meaning that the BME280 has to be connected externally through I2C. Another solution would be to add Cortex M0 support to the RadioHead library (SPI Transactions version).

After testing it has been determined that the RFM95W does not allow for any other SPI devices to be used.

The radio probably does not follow SPI specifications and the BME280 will have to be connected through I2C. This also means that the MAX31855 won't be used/supported.