
menu 1 [go-forward-until-hit]
menu 2 [beep-twice]
menu 3 [go-backwards]
menu 4 [move-wait-move]
menu 5 [back-and-forth]
menu 6 [cha-cha-cha]
menu 7 [beep beep]

to go-forward-until-hit
loop [
    ab, on thisway
    waituntil [switch 7]
    ab, off
    wait 5
    beep-twice
]
end

to beep-twice
    beep
    wait 5
    beep
end

to go-backwards
    ab, on thatway
end

to move-wait-move
    ab, onfor 10
    wait 10
    ab, onfor 10
end

to back-and-forth
    ab, thisway onfor 3
    beep
    ab, thatway onfor 3
    beep
end

to cha-cha-cha
    repeat 4 [back-and-forth]
    ab, off
end
