diff options
| author | Luiz Gustavo Monteiro <luizgu_mreis@hotmail.com> | 2025-10-28 20:25:17 -0300 |
|---|---|---|
| committer | Luiz Gustavo Monteiro <luizgu_mreis@hotmail.com> | 2025-10-28 20:25:17 -0300 |
| commit | 6fed254c8033bf4c67b65328474df6807c3b7eb8 (patch) | |
| tree | ce57462722cdae066b706a78a06d586b5170951b /esp/BMP280.ino | |
| parent | 52a4fe2625b63683fcdcd74f704e49aa65cb0dd8 (diff) | |
refactor folders schema
Diffstat (limited to 'esp/BMP280.ino')
| -rw-r--r-- | esp/BMP280.ino | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/esp/BMP280.ino b/esp/BMP280.ino deleted file mode 100644 index 417edb1..0000000 --- a/esp/BMP280.ino +++ /dev/null @@ -1,29 +0,0 @@ -#include <Wire.h> -#include <Adafruit_Sensor.h> -#include <Adafruit_BMP280.h> - -Adafruit_BMP280 bmp; // cria o objeto do sensor - -void setup() { - Serial.begin(115200); - Wire.begin(21, 22); // SDA e SCL - Serial.println("Teste do Sensor BMP280 - Pressão e Temperatura"); - - if (!bmp.begin(0x76)) { // endereço I2C padrão - Serial.println("Erro: BMP280 não encontrado!"); - while (1); - } -} - -void loop() { - float temp = bmp.readTemperature(); - float press = bmp.readPressure() / 100.0F; // converte Pa para hPa - - Serial.print("Temperatura: "); - Serial.print(temp); - Serial.print(" °C | Pressão: "); - Serial.print(press); - Serial.println(" hPa"); - - delay(2000); // leitura a cada 2 segundos -}
\ No newline at end of file |
