SN3218 PWM driver code issues (Arduino version)

Am I the first person to connect this LED driver board to an Arduino ? - I can’t see any mention of the following issue here or on the GIThub site.

I finally got round to wiring up this board after Christmas and found that only the first 8 channels were working.

A quick check of the library code showed up two typo’s that appear to have slipped through onto the net.

The constant SN3218_CH_ALL , which should turn on all 18 channels ,appears in the header file as 3FFF ( 14 ones in binary ) , but it should be 3FFFF (18 ones).
Secondly , the “enableLEDs” function has three “writeReg” commands for switching on the 3 blocks of drivers, but the
second and third address the same register - “SN3218_CMD_ENABLE_LEDS + 1” . The third one should address the next
register “SN3218_CMD_ENABLE_LEDS + 2”.

After making those changes , the full 18 channels work fine.

Hi! Thanks for the heads up - we’ll fix those issues in the library! @gadgetoid can you take a look at this please?

Boom!

Good spot, thanks.