Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Script B: Listen for "pulse" broadcasts and drive front-side redstone
- -- 1) Open your wireless modem on the top side
- rednet.open("top") -- Open Rednet on "top" :contentReference[oaicite:7]{index=7}
- -- 2) Loop, receiving commands and setting the front output
- while true do
- local senderID, message = rednet.receive("pulse") -- Receive on protocol "pulse" :contentReference[oaicite:8]{index=8}
- -- 3) Update front-side redstone based on the message
- if message == "ACTIVATE" then
- redstone.setOutput("front", true) -- Turn on front redstone :contentReference[oaicite:9]{index=9}
- elseif message == "DEACTIVATE" then
- redstone.setOutput("front", false) -- Turn off front redstone :contentReference[oaicite:10]{index=10}
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment