Skip to content

Instantly share code, notes, and snippets.

View debsahu's full-sized avatar
🐺
meh

Debashish Sahu debsahu

🐺
meh
View GitHub Profile
@debsahu
debsahu / usermod.cpp
Created December 13, 2020 01:34
BME/BMP 280 usermod for WLED
#include "wled.h"
#include <Arduino.h>
#include <Wire.h>
#include <BME280I2C.h> //BME280 sensor
void UpdateBME280Data();
#define Celsius // Show temperature mesaurement in Celcius otherwise is in Fahrenheit
BME280I2C bme; // Default : forced mode, standby time = 1000 ms
// Oversampling = pressure ×1, temperature ×1, humidity ×1, filter off,
#include <WiFi.h>
#include <esp_wpa2.h>
#include <esp_wifi.h>
#include <time.h>
#include <InfluxDbClient.h> // https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino
#include <Wire.h>
#include <Adafruit_BME280.h> // https://github.com/adafruit/Adafruit_BME280_Library
#define HOSTNAME "ESP32 Temperature Sensor"
#define LOCATION "1000 chem"
blueprint:
name: Motion-activated Switch
domain: automation
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
device_class: motion