Nano: I2C plus 10 PWM pins?

Hello fellow makers,

this is the very first post of mine in this very forum, so please be nice...

My question is: On a Nano board, would it be possible to establish an I2C connection on one side plus 10 PWM'ish pins on the other? The idea is to connect the Nano with a Raspberry to receive parameters "inbound" and control a bunch of RGB LEDs' colors "outbound". There would be 3 blocks of RGB LEDs, making 9 output channels, plus 1 channel for white LEDs. A frequency of, let's say, 100 Hz would be good enough.

I know there are dedicated PWM channels on the Nano board, and there are dedicated analog ports. The "Drumrum", I'll take care.

By the way, I decided to keep the German term, although "hodgepodge" doesn't sound so bad :slight_smile:

Kind regards!

For 100Hz, you might be able to simulate PWM in software. But remember if you want 200 steps of brightness inside that 100Hz, you will need timing accuracy to 20,000Hz.

Consider another board. The Teensy 3.2 has 12 PWM outputs. Two of them may conflict with the I2C pins, so you probably have 10 available. You also get one true analog output, although that's not useful for driving LEDs, it may be useful to control a global brightness control.

What distance do you expect to send the I2C? Total length of all wires on the I2C bus? I2C is not very good with more than a few centimeters of wire. You have to work hard to get it up to the metres range. I have found SPI to be better over medium distance, like 2-3m, even though its specifications initially seem more limited.

There are also ready made boards that offer 16 PWM channels and can be controlled via I2C. Might be easier :wink: