Make Robot Build

Thursday, April 15, 2010

Microcontroller pseudo code v1.0



The SX28 chip I intend to use as CD Avenger's Brain. More details about my adventures with this chip are available here.

1. uC activates arm #1's drive lifter mechanism to lift up the front edge arm #2 (customized swinging arm hooked to cdroms laser positioniner)
2. uC ejects cdrom tray (with spike on the end that can bite into carpet. replaceable for different carpet styles?
3. uC after $timeout detects if tray fully extended (use existing opto isolators) and sets $arm#1_obstruction=10 if it IS NOT FULLY EXTENDED


if arm#1_obstruction is set we need to reverse direction for a while (decrementing $arm#1_obstruction)

4A. uC injects cdrom tray (not dropping spike)
5A. uc deactivates arm #1's drive lifter mechanism to drop the spike into the carpet.
6A. uC ejects cdrom tray
7A. uC activates arm #1's drive lifter mechanism to drop the spike into the carpet.
8A. Decrement $arm#1_obstruction and if $arm#1_obstruction > 1 jump back to step 4A

else

4B. uC deactivates arm #1's drive lifter mechanism to drop the spike into the carpet.
5B. uC injects cdrom tray (pulling cdavenger forward).
6B. Jump to step 1 and repeat with ARM#2

No comments:

Post a Comment