summaryrefslogtreecommitdiff
path: root/esp/BMP280.ino
diff options
context:
space:
mode:
authorLuiz Gustavo Monteiro <luizgu_mreis@hotmail.com>2025-10-28 20:25:17 -0300
committerLuiz Gustavo Monteiro <luizgu_mreis@hotmail.com>2025-10-28 20:25:17 -0300
commit6fed254c8033bf4c67b65328474df6807c3b7eb8 (patch)
treece57462722cdae066b706a78a06d586b5170951b /esp/BMP280.ino
parent52a4fe2625b63683fcdcd74f704e49aa65cb0dd8 (diff)
refactor folders schema
Diffstat (limited to 'esp/BMP280.ino')
-rw-r--r--esp/BMP280.ino29
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