1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include <Wire.h> #include <Adafruit_BMP280.h> #include "bmp280.h" Adafruit_BMP280 bmp; void setupBMP280() { if (!bmp.begin(0x76)) { Serial.println("BMP280 nao achado"); while (1); } } float lerTemperaturaBMP280() { return bmp.readTemperature(); } float lerPressaoBMP280() { return bmp.readPressure() / 100.0F; }