Code for fading in and out while also changing colour.

For the discussion of Arduino related topics.

Moderator: phalanx

Post Reply
Oliver_Fr
Posts: 1
Joined: Fri Sep 29, 2017 10:27 pm

Code for fading in and out while also changing colour.

Post by Oliver_Fr » Fri Sep 29, 2017 10:32 pm

Hi there Im having trouble with coding a specific task on my Arduino Uno. I've set up a simple RGB LED circuit. I'm trying to write code, which slowly increases the brightness of an RGB LED for 4 seconds, then sustain maximum brightness for 7 seconds, then slowly fade out for 8 seconds. While this is happening, it should also fade from yellow to orange and finally red. Any help would be appreciated. Thanks.

https://pastebin.com/HzsxmMuJ

Valen
Support Volunteer
Posts: 1685
Joined: Wed Dec 22, 2010 2:05 am

Re: Code for fading in and out while also changing colour.

Post by Valen » Fri Nov 03, 2017 2:38 pm

Your code seems fine. Is there something wrong?

User avatar
DanV
Posts: 333
Joined: Sat Apr 25, 2015 9:29 am

Re: Code for fading in and out while also changing colour.

Post by DanV » Sat Nov 04, 2017 7:09 am

What are the issues you have.
Surely you have run the code and something happened.
Can you describe what happened and what you want it to do differently?

Post Reply