ESP32 I2C Communication: Set Pins, Multiple Bus Interfaces and Peripherals

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

#define I2C_SDA 33
#define I2C_SCL 32

#define SEALEVELPRESSURE_HPA (1013.25)

TwoWire I2CBME = TwoWire(0);
Adafruit_BME280 bme;

unsigned long delayTime;

void setup() {
  Serial.begin(115200);
  Serial.println(F("BME280 test"));
  I2CBME.begin(I2C_SDA, I2C_SCL, 100000);

  bool status;

  // default settings
  // (you can also pass in a Wire library object like &Wire2)
  status = bme.begin(0x76, &I2CBME);  
  if (!status) {
    Serial.println("Could not find a valid BME280 sensor, check wiring!");
    while (1);
  }

  Serial.println("-- Default Test --");
  delayTime = 1000;

  Serial.println();
}

void loop() { 
  printValues();
  delay(delayTime);
}

void printValues() {
  Serial.print("Temperature = ");
  Serial.print(bme.readTemperature());
  Serial.println(" *C");
  
  // Convert temperature to Fahrenheit
  /*Serial.print("Temperature = ");
  Serial.print(1.8 * bme.readTemperature() + 32);
  Serial.println(" *F");*/
  
  Serial.print("Pressure = ");
  Serial.print(bme.readPressure() / 100.0F);
  Serial.println(" hPa");

  Serial.print("Approx. Altitude = ");
  Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA));
  Serial.println(" m");

  Serial.print("Humidity = ");
  Serial.print(bme.readHumidity());
  Serial.println(" %");

  Serial.println();
}

Source: ESP32 I2C Communication: Set Pins, Multiple Bus Interfaces and Peripherals | Random Nerd Tutorials

ESP32 I2C Communication: Set Pins, Multiple Bus Interfaces and Peripherals was last modified: May 4th, 2023 by Jovan Stosic

GitHub – xanthium-enterprises/usb-to-serial-rs485-Converter-non-isolated: USB2RS485 V2.2 is a FT232RL based USB to Serial/RS485 Converter for interfacing RS485 controlled devices with your PC or Mac

https://github.com/xanthium-enterprises/usb-to-serial-rs485-Converter-non-isolated

GitHub – xanthium-enterprises/usb-to-serial-rs485-Converter-non-isolated: USB2RS485 V2.2 is a FT232RL based USB to Serial/RS485 Converter for interfacing RS485 controlled devices with your PC or Mac was last modified: May 4th, 2023 by Jovan Stosic

Scylla

In Greek mythologyScylla (/ˈsɪlə/ SIL-əGreek: Σκύλλα, translit. Skúllapronounced [skýlːa]) is a legendary monster who lives on one side of a narrow channel of water, opposite her counterpart Charybdis. The two sides of the strait are within an arrow’s range of each other—so close that sailors attempting to avoid Charybdis would pass dangerously close to Scylla and vice versa.

Scylla is first attested in Homer‘s Odyssey, where Odysseus and his crew encounter her and Charybdis on their travels. Later myth provides an origin story as a beautiful nymph who gets turned into a monster.

Book Three of Virgil‘s Aeneid associates the strait where Scylla dwells with the Strait of Messina between Calabria, a region of Southern Italy, and Sicily. The coastal town of Scilla in Calabria takes its name from the mythological figure of Scylla and it is said to be the home of the nymph.

The idiom “between Scylla and Charybdis” has come to mean being forced to choose between two similarly dangerous situations.

https://en.wikipedia.org/wiki/Scylla

Scylla was last modified: April 29th, 2023 by Jovan Stosic