October 28, 2023
Description
Base for housing esp32-c3 super micro, push button, bc139 transistor to drive led string in the lantern using Home Assistant and esphome
BOM:
To make it work you should create two 4mm holes in the lantern. One for the led string, other for manually operate the leds.
The wiring is simple.
simplified example of esphome yml script.
esphome:
name: lantern
platformio_options:
board_build.flash_mode: dio
platform_packages:
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
comment: "Lantern"
esp32:
board: esp32-c3-devkitm-1
variant: esp32c3
framework:
type: arduino
version: 2.0.5
platform_version: 5.2.0
switch:
- platform: gpio
pin:
number: 3
inverted: FALSE
mode: OUTPUT
id: led
name: "Led"
restore_mode: ALWAYS_OFF
binary_sensor:
- platform: gpio
pin:
number: 10
mode: INPUT_PULLUP
inverted: TRUE
id: manual
name: "Manual"
on_press:
- switch.toggle: led
internal: true License:
Creative Commons — Attribution — Share Alike