I have made a sign to help people find our home in the rv park.
I added code to change the max brigthness and now when I turn the brightness down below a certain point, my frame rate increases.
I am in no way an expert programmer, I put this together looking at example code and tweaking my code until it did what I wanted.
controller: genuine arduino uno
lcd: adafruit lcd shield
Here is the code for the project:
Sorry to be ‘that guy’ but posting code like this is just too difficult to read and understand in G+ formatting. Try using http://www.pastebin.com
Is this better? I did not think about G+ formatting of it.
@Richard_Bailey Ok, I’ve had a good look through your code and the thing that sticks out to me, is the complexity of which you are ‘framing’ your animation data. In your notes, you mention that you are switching from the RS code to this fabulous library. There are some things in FastLED, behind the scenes things, that you just don’t have to code anymore or are much easier to accomplish with less code.
Typically, I like to do something like this:
//LED assignment code
//update your lcd and do other stuff
//LEDS.delay(5); only add this if I need it
//if you flicker, then add the delay
I save the millis() checking stuff for button debouncing and stuff, not for frame rate control. The LEDS.delay() is non blocking to your code, it just makes sure you don’t spam your LED’s.
I have no idea how I would simplify it, I am not that familiar with FastLED and am still using version 2.1
I am not following you, what do you mean by “LED assignment code happens here” ?
I understand that for the kelley pattern, code is ugly and may be more complex than it needs to be. If there are any ideas on how to make it more elegant and efficient, I would love to hear them.
Can you record a video of what it looks like now? That way we can try to recreate it with some new code that is happy to play with FastLED.
The string starts at the bottom left, runs up the vertical, then to the right and down. there are 12 segments.
@Richard_Bailey Have you made any progress?