I've updated the ESP8266 FastLED Web Server example to include a palette selector.

(Jason Coon) #1

I’ve updated the ESP8266 FastLED Web Server example to include a palette selector. Here’s the simpler version in master: https://github.com/jasoncoon/esp8266-fastled-webserver/commit/681c29a8776a40026a26365d3988dedd38526417

And here’s the slightly more complicated version using the new dynamic field support in v1.1 (takes much less code): https://github.com/jasoncoon/esp8266-fastled-webserver/commit/f04a089fa4e42ddaf2508ea8b2df793f0ab8410e

Not all of the patterns use the selected palette yet, and there are currently two different palette lists: “simple” ones like rainbow, cloud, forest, etc, and the gradient palette list from Mark’s Palette Knife demos. I haven’t decided if/how I want to combine them.

I wasn’t able to figure out how to implement the palette list like the pattern list: as an array of structs with a palette and name. I tried several different approaches, but couldn’t get any of them to compile. I’ll admit I’m beyond my current C skill level. :slight_smile: I ended up just using one array for the palettes, and another array for the names. It works, but it’s not ideal: as the palette list grows, it’ll be harder to keep the two arrays in sync.

Anyone have any ideas to get that to work? Compare the patterns list: https://github.com/jasoncoon/esp8266-fastled-webserver/blob/master/esp8266-fastled-webserver.ino#L274-L293 to the palettes list: https://github.com/jasoncoon/esp8266-fastled-webserver/blob/master/esp8266-fastled-webserver.ino#L297-L312


(DigitalJax) #2

Has anyone told you lately that your awesome?

(Saytinh) #3

Still not tried yet. But awesome. Thanks for sharing

(f otain) #4

Its very good thanks

(Andrew Tuline) #5

Thanks to horrific delays at Canada customs, I’ve been having a bad time with Aliexpress orders since last October (30 days -> 90+ days). Have just ordered 3 of those from Adafruit with shipment via UPS. Was pricey, but it’ll get me in the ESP8266 game.

(Jason Coon) #6

Sorry, @Andrew_Tuline , I have a bunch of Wemos D1 Mini Pros and level shifter shields I could have sent you (from the US). :slight_smile:

(Chris Bendzel) #7


Is this along the lines of what you used for a level shifter?


(Jason Coon) #8

Nope, the FastLED community highly recommends the 74HCT series. It seems to be the only one confirmed to always work at high speeds. I use these, since they’re the only through-hole ones I’ve found: http://www.digikey.com/product-detail/en/texas-instruments/SN74HCT245N/296-1612-5-ND/277258 (8 ports)
http://www.digikey.com/product-detail/en/texas-instruments/SN74HCT125N/296-8386-5-ND/376860 (4 ports)

(Chris Bendzel) #9

Thank you Sir!

(Andrew Tuline) #10

I see that this program is not going to be easy to compile on my brand new Huzzah. Is currently complaining about ‘autoplay’ not being declared on line 736 and 752. Defined it, and had more errors further on.

Also configured and tried the SPIFFS upload, and got an exception with a pile of errors when trying the sketch data upload.

I think I’ll have to take this whole thing one very slow step at a time.

(Jason Coon) #11

@Andrew_Tuline looks like I committed it with a build error. Sorry, I’ll get it fixed and let you know. :slight_smile:

(Jason Coon) #12

@Andrew_Tuline OK, should be fixed. Pull the latest, try again, and let me know if you have any more problems.

(Andrew Tuline) #13

Thanks. It doesn’t like KELVINATOR_STATE_LENGTH in the IRremoteESP8266 function and the Sketch data directory upload still fails miserably. I may need to re-load one or more llibraries/tools.

(Andrew Tuline) #14

Got it working by ripping out the IR code (woot!). I’ve already got IR running on a power friendly Nano, and would really only use the ESP for its ethernet capabilities. Very cool functionality.

(Joem Deocampo) #15

@Jason_Coon Sir, can i ask for help? i’m trying to control my sk6812 led strip using esp8266 to another esp8266(controller). i managed to control it but it has delays. by the way sir my thesis project is a basketball shotclock and time is very crictical. When i pressed START button at the controller the display will not start immediately it will take some time before it will start same with the STOP button and the 14 SEC button sir. I think i have problems in my receiver CODE. can i ask for help sir to check the code? this is my STATION AND AP code sir.



My set-up sir is that I have 3 arduino+esp8266. One acting as AP and the two other are the STATIONS.


(Jason Coon) #16

Hey @Joem_Deocampo , I saw both of your posts on this subject, but unfortunately I’m not sure I can help. I’ve never used SK6812 LEDS, never tried getting two ESP8266 to communicate, and have never used the AT commands, which it looks like you’re using. I hope you get it figured out. Good luck!

(Chris Creel) #17

@Jason_Coon , thanks for all your help in the past. I’m making a 3d printed star for a friend and will be using your pcb for the D1 Mini. When you make projects for folks, do you enter their wifi info in the code or is this set up so they can enter in the ssid and pw in access point mode?

(Jason Coon) #18

@Chris_Creel no problem! I usually enter their wifi info for them, unless they’re comfortable using Arduino. I’ve been meaning to try out the WiFiManager library, which will provide an access point UI for setting up wifi if it’s unable to connect: https://github.com/tzapu/WiFiManager

(Chris Creel) #19

Thanks, @Jason_Coon , I will give that a try, but I’ll probably abandon it quickly if it gives me any grief. Congrats on the Maker Faire spot. I wish KC wasn’t so far because I’d love to see your stuff in person.

(Chris Cooper) #20

@Jason_Coon , seriously, this is really awesome work. Thank you.
I think I have a handle on how/where to add new patterns…though I haven’t been entirely successful yet. Could you point me in the right direction to modify the color picker buttons? I need a grey/white and I see where to modify the button color itself but not the color sent by the JS.