Go Down

Topic: PWM Sync Between Ports (Read 543 times) previous topic - next topic

icecool2

I'm noticing some strange behavior with my PWM code.  I'm writing the same value to two pins, but one pin seems to always lag the other by several updates.  Here's the related code section:

Code: [Select]

while(blueVal > blueMax) {
 waitMinutes(1);
 blueVal -= ((255-blueMax)/20);
 analogWrite(blueLeft, blueVal);
 analogWrite(blueRight, blueVal);
}


Go Up