;; making_decisions.txt ;; ;; Some more procedures that react based ;; on the sensors ;; ;; David Kauchak to fwd-til-bump go-straight waituntil [switch 7] stop-motion end to go-until-black go-straight waituntil [(sensor 0) > 100] stop-motion end to go-until-black2 go-straight waituntil [or ((sensor 0) > 100) ((sensor 1) > 100) ] stop-motion end to beep-if-pressed if (switch 7) [ beep ] end to double-beep-if-pressed ifelse (switch 7) [ beep ] [ double-beep ] end to beep-if-both-pressed if (and (switch 7) (switch 8)) [ beep ] end to beep-if-both-pressed if (switch 7) [ if (switch 8) [ beep ] ] end