Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Script B: Listen for "pulse" broadcasts and drive front-side redstone
- local speaker = peripheral.find("warpdriveSpeaker")
- -- 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("SMiner") -- Receive on protocol "pulse" :contentReference[oaicite:8]{index=8}
- -- 3) Update front-side redstone based on the message
- if message == "check" then
- speaker.speak("Checked")
- print("checked")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement