Re: Adding support for 16 channel PWM expansion to libraries
Posted: Fri Jan 30, 2015 2:30 pm
OK, got it fixed! I now have full 12 bit dimming on my RANet 6 channel dimming expansion!
Not sure what happened. I spotted an error in the receiver code that I swear I fixed earlier. Changed that and it's working.
I used a spare Xbee and the USB module I bought to program them to intercept the data stream. I used a program called RealTerm to look at the hex stream the module was receiving and made sure the 16 bit payload was being sent correctly. It was. That led me back to the receiver code. Turns out I had an error in the code that selects the channel I'm loading. Once that was fixed, it worked!
So now the RANet payload consists 8 bytes for relay boxes, 8 bytes for fallback relay values, 12 bytes for 6 channel dimming (2 bytes per channel) and 32 bytes for 16 channel dimming (not yet implemented, but would be same as 6 channel).
Now, I just need to implement lightning and clouds. It'll take an adjustment to the trigger mechanism.
--Colin
Not sure what happened. I spotted an error in the receiver code that I swear I fixed earlier. Changed that and it's working.
I used a spare Xbee and the USB module I bought to program them to intercept the data stream. I used a program called RealTerm to look at the hex stream the module was receiving and made sure the 16 bit payload was being sent correctly. It was. That led me back to the receiver code. Turns out I had an error in the code that selects the channel I'm loading. Once that was fixed, it worked!
So now the RANet payload consists 8 bytes for relay boxes, 8 bytes for fallback relay values, 12 bytes for 6 channel dimming (2 bytes per channel) and 32 bytes for 16 channel dimming (not yet implemented, but would be same as 6 channel).
Now, I just need to implement lightning and clouds. It'll take an adjustment to the trigger mechanism.
--Colin