Skip to content

Instantly share code, notes, and snippets.

@chunkysteveo
Created June 21, 2022 09:07
Show Gist options
  • Save chunkysteveo/eeef620ce7f258d4e3b756118d5d6808 to your computer and use it in GitHub Desktop.
Save chunkysteveo/eeef620ce7f258d4e3b756118d5d6808 to your computer and use it in GitHub Desktop.
ESPHome YAML config for the TinyPico ESp32 board by Unexpected Maker to activate and control the onboard APA102 "Dotstar" addressable LED. Power to this LED is off by default, and needs to be activated via the onboard PNP transistor circuit controlled by GPIO13 being pulled low by the MCU. ESPHome has a handy "power_supply" option for lights, so…
# Power pin to the APA102 LED - The Tiny Pico controls a PNP transistor on GPIO13 to shut the Dotstar LED down when not in use to save power. Active LOW, so inverted.
power_supply:
- id: 'apa102_psu'
pin:
number: GPIO13
inverted: true
# The Dotstart APA102 onboard addressable LED, power is supplied via 3.3v contolled by transistor managed via GPIO13 as per above.
# It doesn't have a good brightness scale (using ESPHome) and appears almost off below 50% - use this at 70-100% brightness and more as a proof of concept.
light:
- platform: fastled_spi
chipset: APA102
data_pin: GPIO2
clock_pin: GPIO12
num_leds: 1
rgb_order: BGR
name: APA102 LED
power_supply: apa102_psu
effects:
- addressable_rainbow:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment