Παραγγελία έως τις 14:00 τις εργάσιμες = αποστολή την ίδια ημέρα 30 ημέρες δικαίωμα υπαναχώρησης Εγγύηση 1 έτους
← Πίσω στην επισκόπηση

Διάγραμμα σύνδεσης και παράδειγμα κώδικα

Έτσι συνδέεις το Αισθητήρας 3-σε-1 Θερμοκρασία Υγρασία και Ατμοσφαιρική Πίεση | 5V | I2C | Bosch BME280 σε ένα Arduino UNO ή ESP32, με ένα παράδειγμα sketch που μπορείς να ανεβάσεις αμέσως.

Αισθητήρας θερμοκρασίας, υγρασίας και πίεσης BME280

Αυτό το έργο διαβάζει τη θερμοκρασία, τη σχετική υγρασία και τη βαρομετρική πίεση χρησιμοποιώντας τον αισθητήρα BME280 μέσω I2C. Οι μετρήσεις περιβάλλοντος εμφανίζονται στο Serial Monitor κάθε δύο δευτερόλεπτα. Απλώς συνδέστε τον αισθητήρα απευθείας στα pins 5V, GND και I2C του Arduino Uno.

Διάγραμμα σύνδεσης: Αισθητήρας 3-σε-1 Θερμοκρασία Υγρασία και Ατμοσφαιρική Πίεση | 5V | I2C | Bosch BME280 σε ένα Arduino UNO
Διάγραμμα σύνδεσης · Κάνε κλικ για μεγέθυνση
Πίνακας σύνδεσης: Αισθητήρας 3-σε-1 Θερμοκρασία Υγρασία και Ατμοσφαιρική Πίεση | 5V | I2C | Bosch BME280 σε ένα Arduino UNO
Πίνακας σύνδεσης · Κάνε κλικ για μεγέθυνση
BME280_Temperature_Humidity_Pressure_Sen.ino · μεταγλωττισμένο και δοκιμασμένο
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : BME280 Temperature, Humidity & Pressure Sensor
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : Bosch BME280 5V 3-in-1 sensor Temperature Humidity and Air Pressure
 *  Libraries : Adafruit BME280 Library 2.3.0, Adafruit Unified Sensor 1.1.15
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>

Adafruit_BME280 bme;

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    delay(10);
  }

  Serial.println(F("--- BME280 Sensor Test ---"));

  // Try I2C address 0x76 first, fallback to 0x77 if needed
  if (!bme.begin(0x76) && !bme.begin(0x77)) {
    Serial.println(F("Could not find a valid BME280 sensor! Check wiring."));
    while (1) {
      delay(100);
    }
  }

  Serial.println(F("BME280 sensor initialized successfully."));
}

void loop() {
  float temperature = bme.readTemperature();
  float humidity = bme.readHumidity();
  float pressure = bme.readPressure() / 100.0F; // Convert Pa to hPa

  Serial.print(F("Temperature: "));
  Serial.print(temperature, 2);
  Serial.println(F(" °C"));

  Serial.print(F("Humidity:    "));
  Serial.print(humidity, 2);
  Serial.println(F(" %"));

  Serial.print(F("Pressure:    "));
  Serial.print(pressure, 2);
  Serial.println(F(" hPa"));

  Serial.println(F("---------------------------"));
  delay(2000);
}

Απαραίτητες βιβλιοθήκες: Adafruit BME280 Library 2.3.0, Adafruit Unified Sensor 1.1.15

Wiring diagram and example code generated by Codey.online — https://www.codey.online

BME280 Weather Sensor on ESP32

Reads ambient temperature, relative humidity, and barometric pressure from the Bosch BME280 sensor via I2C. The readings are output to the Serial Monitor every two seconds. Powered directly from the ESP32 3.3V pin to ensure safe I2C voltage levels.

Διάγραμμα σύνδεσης: Αισθητήρας 3-σε-1 Θερμοκρασία Υγρασία και Ατμοσφαιρική Πίεση | 5V | I2C | Bosch BME280 σε ένα ESP32 DevKit V1
Διάγραμμα σύνδεσης · Κάνε κλικ για μεγέθυνση
Πίνακας σύνδεσης: Αισθητήρας 3-σε-1 Θερμοκρασία Υγρασία και Ατμοσφαιρική Πίεση | 5V | I2C | Bosch BME280 σε ένα ESP32 DevKit V1
Πίνακας σύνδεσης · Κάνε κλικ για μεγέθυνση
BME280_Weather_Sensor_on_ESP32.ino · μεταγλωττισμένο και δοκιμασμένο
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : BME280 Weather Sensor on ESP32
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : Bosch BME280 5V 3-in-1 sensor Temperature Humidity and Air Pressure
 *  Libraries : Adafruit BME280 Library 2.3.0, Adafruit Unified Sensor 1.1.15
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>

Adafruit_BME280 bme;

void setup() {
  Serial.begin(115200);
  while (!Serial) delay(10);

  Serial.println("BME280 Sensor Test");

  // Default I2C address is 0x76 or 0x77
  if (!bme.begin(0x76) && !bme.begin(0x77)) {
    Serial.println("Could not find a valid BME280 sensor, check wiring!");
    while (1) delay(10);
  }

  Serial.println("BME280 sensor initialized successfully.");
}

void loop() {
  float temperature = bme.readTemperature();
  float humidity = bme.readHumidity();
  float pressure = bme.readPressure() / 100.0F; // hPa

  Serial.print("Temperature: ");
  Serial.print(temperature, 1);
  Serial.print(" °C | Humidity: ");
  Serial.print(humidity, 1);
  Serial.print(" % | Pressure: ");
  Serial.print(pressure, 1);
  Serial.println(" hPa");

  delay(2000);
}

Απαραίτητες βιβλιοθήκες: Adafruit BME280 Library 2.3.0, Adafruit Unified Sensor 1.1.15

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Πρόσφατα προβεβλημένα

Velleman Σταθμός κόλλησης 48 W με LED display και κεραμικό θερμαντικό στοιχείο 160-480 °C

Velleman Σταθμός κόλλησης 48 W με LED display και κεραμικό θερμαντικό στοιχείο 160-480 °C

€ 89,95
Velleman σειρήνα + κόκκινο στροβοσκόπιο σε περίβλημα με LED SV/PSL3R

Velleman σειρήνα + κόκκινο στροβοσκόπιο σε περίβλημα με LED SV/PSL3R

€ 24,35
16-καναλικό 12-bit PWM και Servo shield με διεπαφή I2C για Arduino UNO R3

16-καναλικό 12-bit PWM και Servo shield με διεπαφή I2C για Arduino UNO R3

€ 9,60
χρωματιστό καπάκι για κουμπί πίεσης ot3321 ΚΙΤΡΙΝΟ

χρωματιστό καπάκι για κουμπί πίεσης ot3321 ΚΙΤΡΙΝΟ

€ 0,65
STC-3028 Ρυθμιζόμενο ρελέ 12V για θερμοκρασία και υγρασία

STC-3028 Ρυθμιζόμενο ρελέ 12V για θερμοκρασία και υγρασία

€ 17,90
Καλώδιο 4-κλωνο 22AWG Ø1.3mm μπλε / κόκκινο / πράσινο / μαύρο 1 meter

Καλώδιο 4-κλωνο 22AWG Ø1.3mm μπλε / κόκκινο / πράσινο / μαύρο 1 meter

€ 0,75
Ασύρματη μονάδα ρελέ incl. Τηλεχειριστήριο (2 κουμπιά) - 12V, 1 Κανάλι, 433Mhz RF

Ασύρματη μονάδα ρελέ incl. Τηλεχειριστήριο (2 κουμπιά) - 12V, 1 Κανάλι, 433Mhz RF

€ 12,95
Προβολή
Κουμπί πίεσης | on-off self lock | 12-24V LED Μπλε | Ανοξείδωτο ατσάλι | 16mm

Κουμπί πίεσης | on-off self lock | 12-24V LED Μπλε | Ανοξείδωτο ατσάλι | 16mm

€ 4,70
χρωματιστό καπάκι για κουμπί πίεσης ot3321 ΚΟΚΚΙΝΟ

χρωματιστό καπάκι για κουμπί πίεσης ot3321 ΚΟΚΚΙΝΟ

€ 0,65
STC-3028 Ρυθμιζόμενα ρελέ 220V για θερμοκρασία και υγρασία

STC-3028 Ρυθμιζόμενα ρελέ 220V για θερμοκρασία και υγρασία

€ 18,70
Διπλό ρελέ διακόπτης θερμοκρασίας και υγρασίας 12V

Διπλό ρελέ διακόπτης θερμοκρασίας και υγρασίας 12V

€ 8,75
Κουμπί πίεσης | moment - puls | 14x20 στρογγυλή οπή 12mm | Λευκό

Κουμπί πίεσης | moment - puls | 14x20 στρογγυλή οπή 12mm | Λευκό

€ 1,00
1,28″ στρογγυλή TFT LCD 240×240 (GC9A01, SPI) για Arduino

1,28″ στρογγυλή TFT LCD 240×240 (GC9A01, SPI) για Arduino

€ 8,99
Προβολή
Mecanum Τροχός /Πολυκατευθυντικός Τροχός - 80MM-A Κίτρινο  - σετ 2 τροχών (1xL+1xR)

Mecanum Τροχός /Πολυκατευθυντικός Τροχός - 80MM-A Κίτρινο - σετ 2 τροχών (1xL+1xR)

€ 13,00