KRITSADA

Servo SM-Gripper Test

Sep 11th, 2018
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function canUp() {
  2.     iBIT.Servo(ibitServo.SV1, 150)
  3.     basic.pause(500)
  4.     iBIT.Servo(ibitServo.SV2, 150)
  5. }
  6. input.onButtonPressed(Button.A, function () {
  7.     canUp()
  8. })
  9. input.onButtonPressed(Button.B, function () {
  10.     canDown()
  11. })
  12. function canDown() {
  13.     iBIT.Servo(ibitServo.SV2, 80)
  14.     basic.pause(500)
  15.     iBIT.Servo(ibitServo.SV1, 80)
  16.     basic.pause(500)
  17.     iBIT.Servo(ibitServo.SV2, 80)
  18. }
  19. iBIT.Servo(ibitServo.SV2, 80)
  20. iBIT.Servo(ibitServo.SV1, 80)
  21. basic.pause(500)
Advertisement
Add Comment
Please, Sign In to add comment