Hi,
I have problems with an ESP32 CAM and a light ring. I want the light ring to only light up LED 1 to 6 for 11s and then go black.
With the code down under the right LEDs light up but after 1s all LED turns on. And after 11s all LEDs go black as it should do.
Im new to this so I guess its just something wrong in the code.
esphome:
name: "vattenmatare-cam"
platform: ESP32
board: esp32dev
# Enable logging
logger:
# Enable Home Assistant API
api:
reboot_timeout: 0s
ota:
web_server:
port: 80
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp32-Cam Fallback Hotspot"
password: "XXXXXXXXXXXXX"
captive_portal:
# Example configuration entry
esp32_camera:
external_clock:
pin: GPIO0
frequency: 20MHz
i2c_pins:
sda: GPIO26
scl: GPIO27
data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
vsync_pin: GPIO25
href_pin: GPIO23
pixel_clock_pin: GPIO22
power_down_pin: GPIO32
# Image settings
name: My ESP32-CAM
# Flashlight
output:
- platform: gpio
pin: GPIO4
id: gpio_4
light:
- platform: fastled_clockless
rgb_order: GRB
chipset: WS2812B
pin: GPIO12
num_leds: 12
name: flashlight
id: my_flashlight
on_turn_on:
then:
- light.addressable_set:
id: my_flashlight
range_from: 0
range_to: 5
red: 100%
green: 100%
blue: 100%
- delay: 11s
- light.addressable_set:
id: my_flashlight
range_from: 0
range_to: 11
red: 0%
green: 0%
blue: 0%