reefangel/Libraries — pull request #158 by amunter (2014-07-28 01:35:46+00:00)
Title: Adding in 16Channel PWM module support

These commits add support for the 16 channel dimming module, and increase the PWM resolution to 12-bit for light dimming everywhere possible, with the exception of the ATO pins, Daylight/Actinic, and the old 6 channel expansion chip.

They also adds highATO as a DCPump possibility, add Else and Sine as DCPump modes, and attempt to account for the 12-bit integer values stored in the PWM channels (including the 8 bit pins, which get converted from 12 to 8 when actually written to the pins) by giving the right number to the WiFi classes. They also fix a bug in PWMSmoothRamp.

The second commit adds in the extra 16 channels to the new RANet stuff since now anyone with a wireless relay box will need to be able to talk to their 16 channel module.

I added the 16 channel stuff to the ControllerTester.ino file with some test DCPump modes (LongPulse and Sine) and using PWMSmoothRamp as my light profile, compiled, uploaded, and verified operation with a voltmeter. I'm unable to verify operation with the portal and Apps. The portal is hit-or-miss for me. If I use internal memory for DCPump it doesn't seem to get the mode and speed, etc from the portal. The apps similarly don't connect, iOS, Android, or the new Universal. Not sure if this is because I'm doing something wrong or if it's this code. Forwarding seems to be working fine, though.