Open michaeljanich opened 6 years ago
My code is full of
if (pin == 1 || pin == 23) { wpi.pinMode(pin, wpi.PWM_OUTPUT); // hardware PWM wpi.digitalWrite(pin, value); } else { wpi.softPwmCreate(pin, 0, value / 10.23); }
these if's to distinguish between software PWM and hardware PWM pins.
Is there a better solution? Like an automatic switch inside the library?
THANKS
My code is full of
these if's to distinguish between software PWM and hardware PWM pins.
Is there a better solution? Like an automatic switch inside the library?
THANKS