Hey guys this is my first post on here (go easy), I'm trying to make a flickering LED effect using a 4pin LED, I know normal LED flame tutorials have been done to death but I can't seem to find one for 4pins, I'm using these ones because in my experience theyre a lot brighter. So! Out of curiosity I tried this code with the LED, it works in terms of flickering, but it goes all different colours as opposed to going traditional red/yellow. I've got another 2 of these LED's if its a case of setting them individually to a colour then getting them to flicker. Can anyone point me in the right direction? Any help is appreciated! Thanks
johnwasser:
To keep the light in the Red/Orange/Yellow range you probably want to make sure that the Green and Blue components are the same intensity:
Unfortunately, green and blue do not mix to give yellow, that gives cyan. You need to mix red and green to get yellow. Try selecting a random red level, then a random green level that is no greater than the red level you picked. Either don't use blue at all, or use a random blue level that is no greater than the green level you picked.