Flowing RGB LED example
Moderator: Benj
-
- Posts: 26
- Joined: Thu Jul 05, 2012 11:29 pm
- Has thanked: 12 times
- Been thanked: 1 time
Flowing RGB LED example
Hi guys, anyone done a flowing RGB LED example? changing through all colours to white in a glowing type pattern? I've started one but didn't realise how long it would take to get a nice flowing one.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
Re: Flowing RGB LED example
Hi,
You can have a look at the following posts:
You will get nice working examples here..
http://www.matrixmultimedia.com/mmforum ... RGB#p35403
http://www.matrixmultimedia.com/mmforum ... RGB#p31623
http://www.matrixmultimedia.com/mmforum ... RGB#p34338
Enamul
You can have a look at the following posts:
You will get nice working examples here..
http://www.matrixmultimedia.com/mmforum ... RGB#p35403
http://www.matrixmultimedia.com/mmforum ... RGB#p31623
http://www.matrixmultimedia.com/mmforum ... RGB#p34338
Enamul
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Flowing RGB LED example
Hello,
The easiest way to get every single combination of colours is to create a loop with 3 nested incrementing variables each controlling a colour channel.
The easiest way to get every single combination of colours is to create a loop with 3 nested incrementing variables each controlling a colour channel.
- Attachments
-
- RGBLED.fcf
- (10 KiB) Downloaded 470 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 26
- Joined: Thu Jul 05, 2012 11:29 pm
- Has thanked: 12 times
- Been thanked: 1 time
Re: Flowing RGB LED example
Thanks Benj this is just what I needed. have bodged up a file to give a rainbow from the RGB led. I'm sure it's to long winded but it works to a sort. Delay macro is the speed of the glow and delay2 is the pause at the end of each colour.
It starts blue to go to white but after the 1st round it all works. please feel free to add to it or re do if it's a load of rubbish.
Ben
It starts blue to go to white but after the 1st round it all works. please feel free to add to it or re do if it's a load of rubbish.
Ben
- Attachments
-
- rgb glow.fcf_avr
- (21.06 KiB) Downloaded 367 times
-
- Posts: 26
- Joined: Thu Jul 05, 2012 11:29 pm
- Has thanked: 12 times
- Been thanked: 1 time
Re: Flowing RGB LED example
Have made an example for people who have the home /student version with no RGB complile feature using PWM.
The chip is using an arduino mega adk but can be change for any chip. led pins are 13,11,4 (not sure why if anyone can tell me how to know what my PWM pins are on my arduino) again the delay macro controlls speed and the delay2 controls the pause at the end of the colour glow.
Feel free people to download and use as you like. I may redo it to tidy it up but it's working. (still has RGB component but it won't compile unless you have the pro v5)
Can anyone tell me if the previous file works with v5 pro?
Ben
The chip is using an arduino mega adk but can be change for any chip. led pins are 13,11,4 (not sure why if anyone can tell me how to know what my PWM pins are on my arduino) again the delay macro controlls speed and the delay2 controls the pause at the end of the colour glow.
Feel free people to download and use as you like. I may redo it to tidy it up but it's working. (still has RGB component but it won't compile unless you have the pro v5)
Can anyone tell me if the previous file works with v5 pro?
Ben
- Attachments
-
- rgb glow pwm.fcf_avr
- (26.15 KiB) Downloaded 396 times
Re: Flowing RGB LED example
Hi ben
In the chip view it lists the pwm pins and thier corresponding arduino d pins give me an hour or so and i will pop up a modified fcd with shows the pwm numbers ie pwm1 etc
In the chip view it lists the pwm pins and thier corresponding arduino d pins give me an hour or so and i will pop up a modified fcd with shows the pwm numbers ie pwm1 etc
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
Re: Flowing RGB LED example
Hi ben
attached is a modified fcd ,a and 2 pic which show the extra bits added to the chip view, you will also notice that there an extra 2 pwm's in flowcode (15 and 16)
copy the fcd file attached into your flowcode fcd folder, dont rename it just yet, restart flowcode and select the new chip (mega 2560 adk pwm) as your target then in the chip view you will see that the pwm pins have thier corresponding chanels added ie pwm1 pwm2 etc
first pic shows the chip view with the normal fcd, and pic 2 shows the new one , have a look at the black circle hope it helps
Regards
Dazz
attached is a modified fcd ,a and 2 pic which show the extra bits added to the chip view, you will also notice that there an extra 2 pwm's in flowcode (15 and 16)
copy the fcd file attached into your flowcode fcd folder, dont rename it just yet, restart flowcode and select the new chip (mega 2560 adk pwm) as your target then in the chip view you will see that the pwm pins have thier corresponding chanels added ie pwm1 pwm2 etc
first pic shows the chip view with the normal fcd, and pic 2 shows the new one , have a look at the black circle hope it helps
Regards
Dazz
- Attachments
-
- 2.jpg (105.48 KiB) Viewed 7958 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 26
- Joined: Thu Jul 05, 2012 11:29 pm
- Has thanked: 12 times
- Been thanked: 1 time