sending pwm to multiple pins using CurrieTimerOne.pwmStart

I'm trying to use the CurrieTimerOne.pwmStart command to send clock signals to multiple pins, but I'm only able to use this function for one pin at a time. Whichever pin is listed last will work, while the first one is just high. Is there a way to use this function for multiple pins with different clock speeds?

#include "CurieTimerOne.h"

void setup() {

// CurieTimer PWM function - pin, dutycyle(0-1023), period(us)

CurieTimerOne.pwmStart(4, 512, 1000);    // SHCP Serial Clock on PIN 4 - 1ms 1kHz
CurieTimerOne.pwmStart(13, 512, 100000);  // blink LED on PIN 13 - 100ms 10Hz


Hi Zonan,

pwmStart() function simply wraps a callback to a PWM-like function (see, so calling more than once overrides the previous setup.

To overcome this, you can copy pwmCallback function inside the sketch (, adapt it to your needs, then start the timer with start(period, yourCallback)

Hope it helps!

thank you sir, that's a perfect example of what I'm looking for