Hey Guys
Im not a genius by any stretch and lambdas arent my forte either.
Im trying to make a fire truck bed for my son and was going to use 2 WS2812 strips to blink Red and Blue alternately, either side of the bed however I dont know how to create an effect in ESPhome to blink Red and then Blue.
Could someone give me a starter as to how to do it?
Im assuming a lambda is the way to go.
Thanks
Here is a cut and paste from one of my projects, should give you a starting point
light:
- platform: neopixelbus
type: GRB
variant: WS2811
pin: GPIO13
num_leds: 8
name: "RGB Light"
effects:
- strobe:
name: Police_Lights
colors:
- state: true
brightness: 100%
red: 100%
green: 00%
blue: 0%
duration: 250ms
- state: true
brightness: 1%
red: 100%
green: 00%
blue: 0%
duration: 150ms
- state: true
brightness: 100%
red: 100%
green: 00%
blue: 0%
duration: 250ms
- state: true
brightness: 1%
red: 100%
green: 00%
blue: 0%
duration: 150ms
- state: true
brightness: 100%
red: 0%
green: 0%
blue: 100%
duration: 250ms
- state: true
brightness: 1%
red: 0%
green: 0%
blue: 100%
duration: 150ms
- state: true
brightness: 100%
red: 0%
green: 0%
blue: 100%
duration: 250ms
- state: true
brightness: 1%
red: 0%
green: 0%
blue: 100%
duration: 150ms
Sooo… another important factor is how you install them in the truck. For example is this 1 set of lights that starts from 1 corner and fully wraps the bed? Is it multiple strips where possibly one goes left and the second goes right so each covers half the bed and they meet in the middle? What do you have going on with them?
For something like simulating a light bar, strobing blue/red, you dont need to use any lambdas or go crazy creating effects from scratch. Everything is there already, you just need to put it together and all the pieces are explained in the documentation.
Here it shows you how to setup your lights.
Here is the page for using your lights which includes effects.
Get your lights wired up and test to make sure they work. After that, read through the docs and try it out. If its not going well, state the problem your having.
Not many people are eager to spend their time helping someone who basically hasnt even tried yet. People will help you but, not if it its at their expense 100%
I am so blind…
You know when you get deep into stuff and you get blinded by the complex stuff because you think something so simple doesnt exist???
Yep - that was me.
I already have many effects installed on this project - I just totally skimmed over “Strobe” in the docs.
Thanks!
Its pretty common for people to do that. I highly recommend browsing through the documentation and just getting familiar with whats in there and how to use it, its very useful information.