View difference between Paste ID: tkei1k2U and KwmMwzv1
SHOW: | | - or go back to the newest paste.
1-
modem = peripheral.wrap("bottom")
1+
motor = peripheral.wrap("bottom")
2
while 1 do
3
  term.clear()
4
  term.setCursorPos(1,1)
5
  print("Welcome to VirtualDXS's Flying Base!")
6
  print("This is the control computer. Would you like to move:")
7
  print("  F)orward")
8
  print("  B)ack")
9
  print("  L)eft")
10
  print("  R)ight")
11
  print("  U)p")
12
  print("  D)own")
13
  print("  ")
14
  while 1 do
15
    local event, keystroke = os.pullEvent("char")
16
    if keystroke == "f" then
17-
      motor.move(
17+
      motor.move(0,false,false)
18
    elseif keystroke == "b" then
19-
      motor.move(
19+
      motor.move(2,false,false)
20
    elseif keystroke == "l" then
21
      motor.move(3,false,false)
22
    elseif keystroke == "r" then
23
      motor.move(1,false,false)
24
    elseif keystroke == "u" then
25
      motor.move(5,false,false)
26
    elseif keystroke == "d" then
27
      motor.move(6,false,false)
28
    end
29
  end
30
end