03/21/2021 at 18:16 •
The H-Bridge motor driver that came with the Kookye kit allows PWM input on the the ENA and ENB pins. After getting things functional with simple enable/disable logic I added PWM control from the Raspberry Pi.
To enable the PWM sysfs driver for Raspberry Pi pins 12 and 13 add the following line to your /boot/config.txt.
As a Pro-Tip, to debug errors in your config.txt use the following command to print the logs from starting up
sudo vcdbg log msg
After figuring out the process for enabling and setting PWM settings, I got to work developing the F' Component to control them. You can see the final result in the Tank/PWMMotorControl directory in my fork of F'.
Next step is a Component for Gamepad input for simple testing of the motor controls.