Can I use the tone() function as a PWM output to a motor driver?
I'd like to use this motor driver. Pololu G2 High-Power Motor Driver 18v17. The maximum PWM frequency of this motor driver is 100khz. But I only need to go up to 5khz, as I would like response times to be within .2 milliseconds. The motor driver response time is well below this. So I think it will work fine.
I am using an Arduino YUN. I've read the Pins 3 and 11 on the Leonardo can run at 980 Hz, which is slightly longer than 1ms. And that might have to settle for that.
However, I'd like finer control. In the tone reference link above, it states for the Leonardo...
Max tone frequency: 65535Hz
Is there something with the low voltage output of the tone() function that won't work to run a motor driver?
I've read many older posts which give instructions on using the system clock. But I'm wondering if since the YUN processor is 16mhz, it's already doing that, and has been added to Audrino library and IDE?
Or, maybe the tone function skips clock cycles, and I'd end up with a lower resolution anyway.
I'd appreciate any help, or other suggestions on how to control the pwm output.