hm, i think i've worked out what one of the issues with the arduino rgbs are
analogWrite is not overwriting previous values properly. i set up a basic test of cycling between red, green, and blue and it's cycling through pink, yellow, and cyan.
So now the next step is to work out how to fix this. And this would also show why it isn't mattering so much on the rgb fade, as i'm going through all the colours of the rainbow anyway so it's not noticable.
worked it out. the LEDs are taking in the opposite values to what i expected.
so if i want a pure red i want 0, 255, 255 rather than 255, 0, 0
the fun thing with programming these lights is i'm used to doing rgb colours based on light/darkness in art but with lights it's how on or off the light is so i can't just take the colours i want and copy paste them in, i'm having to work out the most saturated approximation of the colour so i can get the right colour appearing rather than what's happening at the moment where purples are just half on lights.
it's a fun thing i'm havin to do different with my brain and i'm enjoying it
what's not fun is my brain not quite clicking on the maths i need to do to create a method for fading it properly. i can do it, i just am very slow think right now after a week of work. taking out brain and shaking it in a jar until it starts mathsing again
sorry fedi you're bringing brought along on adventures of pretty coloured lights
i've got the setup code done now i think. C++ isn't that different to a lot of code i've used but it's definitely got some quirks that i'm not entirely used to.
so now i can start playing about with colour combos
@castaras if it helps, lerp(a,b,t) is tb + (1-t) a and will be a when t=0 and b when t=1. Then you can apply this once per coordinate, set a=255 for "off", set b to your color and slowly increase t over time to fade in and decrease t over time to fade out
@hillexed oooo that's good to have on the back burner, thanks!
i ended up going for transitions where i want 2 specifed colours and a transition set up between them, so ended up doing some division over duration, especially as it seems the LED pins don't care if i send them decimals.
first attempt at trans lights - the lights are in fabric because these LED strips are part of LARP costume and all this is in aid of me being able to change the colours my character is lit up with at dramatic moments.
so of course trans lights are for when he's feeling particularly queer.
I think it would benefit from me pausing the light rotation on each colour rather than instantly going between.
hm. i am definitely going to have to attach a button to my board so i can have multiple settings loaded
these are too much fun
@castaras yessss youve caught zhe blinkenlights fever too
zheyre fun zhings to play around wizh
@mynotaurus yeaaaaa i've fallen down this rabbithole hard and i'm doomed
it's all this damn larp's fault, with them going 'oh if you're a zombie you have wild magic in you, and wild magic is bright colours' and me going 'ok but. rainbows. can i do rainbow lights'.
alas, button attempt has failed and i think i've hit the end of my brain power now.
have set it back to rainbow for now and that is all i needed for now so i'm happy. future me can mess with things later