SHOW:
|
|
- or go back to the newest paste.
1 | local modem = peripheral.wrap("top") | |
2 | modem.open(55000) | |
3 | while true do | |
4 | ||
5 | ||
6 | event, s, f, rf, msg = os.pullEvent("modem_message") | |
7 | ||
8 | ||
9 | if msg == "POWER" then | |
10 | - | redstone.setOutput("left",true) |
10 | + | redstone.setOutput("left",true) |
11 | - | print(""..msg) |
11 | + | print(""..msg) |
12 | modem.transmit(56000, 1, "ON") | |
13 | end | |
14 | - | redstone.setOutput("left",false) |
14 | + | |
15 | - | print(""..msg) |
15 | + | redstone.setOutput("left",false) |
16 | print(""..msg) | |
17 | modem.transmit(56000, 1, "OFF") | |
18 | end | |
19 | end |