ShadowGuidedBowBot

ShadowGuidedBowBot - ELSEIF(IN6 = 0 THEN Left detects shadow pivot left ELSEIF(IN3 = 0 THEN Right detects shadow pivot right ELSE No shadow sit

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
' Robotics with the Boe-Bot - ShadowGuidedBoeBot.bs2 ' Boe-Bot detects shadows cast by you hand and tries to follow them. ' ' {$Stamp bs2} ' Stamp directive. ' {$PBASIC 2.5} ' PBASIC directive. ' FREQOUT 4, 2000, 3000 ' Start/restart signal. F DO ' Both detect shadows, forward. D IF (IN6 = 0) AND (IN3 = 0) THEN ' Both detect shadows, forward.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: PULSOUT 13, 850 PULSOUT 12, 650 ELSEIF (IN6 = 0) THEN ' Left detects shadow, PULSOUT 13, 750 ' pivot left. PULSOUT 12, 650 ELSEIF (IN3 = 0) THEN ' Right detects shadow, PULSOUT 13, 850 ' pivot right. PULSOUT 12, 750 ELSE PULSOUT 13, 750 ' No shadow, sit still PULSOUT 12, 750 ENDIF PAUSE 20 ' Pause between pulses. LOOP...
View Full Document

This note was uploaded on 04/23/2010 for the course EECC 0306-201 taught by Professor Roymelton during the Spring '10 term at RIT.

Ask a homework question - tutors are online