Did you know that the SAMD21 BordSupportPckage has a function
pwm(pin, frequency, duty) with 10-bit resolution?
The function is located here:
\Arduino15\packages\Seeeduino\hardware\samd\1.8.5\cores\arduino\wiring_pwm.cpp
1 Like