Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- p1 = peripheral.wrap("right")
- p2 = peripheral.wrap("left")
- prox = sensor.wrap("back")
- while true do
- while p2.testBundledInput(colors.green) == false do
- -- print("Wait")
- p1.setBundledOutput(colors.gray)
- os.sleep(1)
- end
- p1.setBundledOutput(0)
- os.sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement