Source: ESP32 I2C Communication: Set Pins, Multiple Bus Interfaces and Peripherals | Random Nerd Tutorials
Engineering and technology
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
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
SQL Server : Columns to Rows
convert the columns in
How to Import a CSV File in MySQL? {Command Line or phpMyAdmin}
Migrate from Ubuntu to Debian and take the application data along – Unix & Linux Stack Exchange
Grafana change date format – tip of the day – Configuration – Home Assistant Community
Since Grafana version 7.20 14 (Grafana addon updated 2020-09-23) it is now possible to localize the date format in a env.
read more here 336 about the options
Default is US i.e. MM/DD HH:mm
Update your grafana configuration to DD/MM
plugins: []
env_vars:
- name: GF_DATE_FORMATS_INTERVAL_HOUR
value: 'DD/MM HH:mm'
- name: GF_DATE_FORMATS_INTERVAL_DAY
value: DD/MM
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
Source: Grafana change date format – tip of the day – Configuration – Home Assistant Community