Close

More more sound stuff

A project log for Retro Robot Restomod

Breathing new life into a 22 year old robot toy

scottscott 04/07/2014 at 10:120 Comments

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