Skip to content

Instantly share code, notes, and snippets.

View keithellis74's full-sized avatar

Keith's Pi Tutorials keithellis74

View GitHub Profile
@keithellis74
keithellis74 / Home-assistant-fan.yaml
Last active August 24, 2022 20:34
Home Assistant humidity controlled fan
# Derivative sensor in configuration.yaml. Note this can now be setup as a helper in the UI
- platform: derivative
name: Bathroom humidity rate of change
source: sensor.sonoff_004_humidity
time_window: 00:01:00
round: 1
# Automation to turn fan on
@keithellis74
keithellis74 / ESPHome current clamp
Created December 18, 2021 22:37
ESP Home config for https://www.mottramlabs.com 4 channel current clamp sensor
esphome:
name: current-clamps
platform: ESP8266
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
@keithellis74
keithellis74 / ramp_test.ino
Last active March 11, 2020 23:06
Arduino Ramp Library Test
#include <Ramp.h>
rampInt myRamp;
int Ramp_Value;
int Target = 1000;
int Ramp_Duration = 2000;
void setup() {
Serial.begin(9600);

Keybase proof

I hereby claim:

  • I am keithellis74 on github.
  • I am keithellis (https://keybase.io/keithellis) on keybase.
  • I have a public key ASAnOd2C6KEvfj8BkdopBAFcYWZMmgJXNRKX1stat5NQdAo

To claim this, I am signing this object:

@keithellis74
keithellis74 / nl-interrupt
Created October 20, 2018 21:38
RasP.io Night Light - Interrupt
#include<FastLED.h>
const int numLEDS = 8;
const int dataPin = 7;
const int clockPin = 5;
const int interruptPin = 3; // PIR output is now connected to this pin
volatile long countDown = 0; // Variable to hold the millis() time to turn off the LED's
volatile bool movement = false; // Vairable is true when movement has been detected, else it is false
bool lightOn = false; // Viarable is true when the LED's are on, otherwise it is false
int ldr = 0;