View difference between Paste ID: q6htCMX9 and RVBFksDp
SHOW: | | - or go back to the newest paste.
1
rednet.open("left");
2
print("Elevator Control Client v0.3 ")
3
print("------------------------------------")
4
print("Use your rednet device to control")
5
print(" -- 'UP' to move up")
6
print(" -- 'DOWN' to move down")
7
print(" -- 'UPDATE' to perform firmware update")
8
print("")
9
10-
for i=1, 100 do
10+
11-
	turtle.down()
11+
12-
end
12+
13
14
    if (command == "UP") then
15
        turtle.up()
16
    end
17
    if (command == "DOWN") then
18
        turtle.down()
19
    end
20
    if (command == "UPDATE") then
21
        id, link = rednet.receive()
22
        print ("Updating firmware....")
23
        sleep(5)
24
25
        shell.run("delete startup");
26
        shell.run("pastebin get " .. link .. " startup")
27
28
        print("Update DONE.")
29
        sleep(2)
30
        os.reboot()
31
    end
32
end