I've modified the firmware to drive a couple servos and toggle GPIOs on serial command.
The servos are being software driven in the audio interrupt. The interrupt runs at 31250Hz, so it means we can drive servos with 32 positions.
To set the servo position, send 'A' thru 'E' followed by 2 decimal digits.
The timing was reeally tight, so only the first 3 servos are updated at full resolution, the rest are half resolution. (setting the digital out pin takes interrupt time which is very precious)
The A pins are set as outputs.
Send 'a' thru 'f' followed by 0 or 1 to set them.
https://github.com/scottwday/Arduino/tree/master/SdCardWavPlayer
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.