PWM Expansion
-
- Posts: 14
- Joined: Thu Feb 16, 2012 5:46 am
- Location: Brazil
- JNieuwenhuizen
- Posts: 96
- Joined: Thu Feb 16, 2012 12:39 am
- Location: South Africa
Re: PWM Expansion
Hi Roberto.rimai wrote:1. No
2. 2nd Gen relay boxes have a usb like connector on the side of the box that you can use to connect one expansion module or the expansion hub.
3. All expansion modules can be plugged into the hub. Currently there are Relay, PWM and I/O expansion modules. Some are only on special order basis for now.
4. The PWM expansion module is a little tiny box with 6 boosted independent PWM channels. It has another 328p inside of it working as a slave. You can communicate with it through I2C. I decided to make it with another 328p in slave mode to take the load of lighting effects off of the master head unit.
So, it is very simple to call any effect that you may want or even change effects if one would like to.
Attached is the PDE file that is loaded into the PWM expansion module.
One could actually very easily turn it into a stand-alone 6 channel PWM controller, by just modifying the code.
To call the effects on the module, you can issue the following commands:
Change individual channel, where x is a number from 0 to 5, which represent which channel you would like to change and y is the a number from 0 to 255, which represent the PWM duty cycle.For Fast CloudCode: Select all
PWMExpansion(x,y);
For Slow CloudCode: Select all
PWMExpansion(6,1);
For Thunderstorm 1 (preset pattern)Code: Select all
PWMExpansion(6,15);
For Thunderstorm 2 (random pattern)Code: Select all
PWMExpansion(7,0);
Code: Select all
PWMExpansion(8,0);
I am confused - The code I am using is from another user, he has it as a PWM pde. I used it in my pde file all combined. Is it best practise to use it on the pwm only? if so, how do you load the file on your pwm?
My complete pde is here : http://forum.reefangel.com/viewtopic.ph ... 9&start=10
Re: PWM Expansion
No. You can use it anywhere you want.
The problem is that if you had the standard RA, you would not have space for the code.
That's why this person has divided the code into PWM module code and RA code.
Because you have so much memory in your RA+, you can keep everything in the RA side and leave the PWM expansion module as is.
The problem is that if you had the standard RA, you would not have space for the code.
That's why this person has divided the code into PWM module code and RA code.
Because you have so much memory in your RA+, you can keep everything in the RA side and leave the PWM expansion module as is.
Roberto.
- JNieuwenhuizen
- Posts: 96
- Joined: Thu Feb 16, 2012 12:39 am
- Location: South Africa
Re: PWM Expansion
Thank You for the info Roberto.