Untitled
unknown
plain_text
a year ago
606 B
5
Indexable
-- Initialize rednet and modem
rednet.open("left")
redstone.setOutput("back", false) -- Ensure redstone is initially off
-- Define the specific message to trigger the redstone signal
local triggerMessage = "activate_redstone"
-- Wait for rednet signal
while true do
local senderID, message, distance = rednet.receive()
-- Check if the received message is the trigger
if message == triggerMessage then
-- Activate redstone output for 5 seconds
redstone.setOutput("back", true)
sleep(5) -- Wait for 5 seconds
redstone.setOutput("back", false) -- Turn off redstone output
end
end
Editor is loading...
Leave a Comment