Skip to content

Instantly share code, notes, and snippets.

@Nizzle

Nizzle/shabadge.yaml

Last active Oct 10, 2020
Embed
What would you like to do?
ESPhome config for SHA2017 badge (https://wiki.sha2017.org/w/Projects:Badge)
esphome:
name: shabadge
platform: ESP32
board: esp32doit-devkit-v1
logger:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_pass
ota:
password: !secret ota_pass
api:
id: hassapi
password: !secret api_pass
i2c:
sda: 26
scl: 27
scan: True
mpr121:
id: mpr121_component
address: 0x5A
touch_debounce: 1
release_debounce: 1
touch_threshold: 12
release_threshold: 6
binary_sensor:
- platform: mpr121
id: touch_buttonA
channel: 0
name: "Touch Button A"
- platform: mpr121
id: touch_buttonB
channel: 1
name: "Touch Button B"
- platform: mpr121
id: touch_buttonStart
channel: 2
name: "Touch Button Start"
- platform: mpr121
id: touch_buttonSelect
channel: 3
name: "Touch Button Select"
- platform: mpr121
id: touch_buttonDown
channel: 4
name: "Touch Button Down"
- platform: mpr121
id: touch_buttonRight
channel: 5
name: "Touch Button Right"
- platform: mpr121
id: touch_buttonUp
channel: 6
name: "Touch Button Up"
- platform: mpr121
id: touch_buttonLeft
channel: 7
name: "Touch Button Left"
- platform: mpr121
id: charging_status
channel: 9
name: "Charging Status"
- platform: gpio
name: "Flash Button"
pin: 0
filters:
- invert:
sensor:
- platform: adc
pin: 34
attenuation: 6db
filters:
- multiply: 2.91
name: "USB Voltage"
update_interval: 20s
accuracy_decimals: 1
- platform: adc
pin: 35
attenuation: 6db
#attenuation: 2.5db
filters:
- multiply: 2.91
#- multiply: 1.95
name: "Battery Voltage"
update_interval: 20s
accuracy_decimals: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.