Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Ouvrir le modem
- rednet.open("back")
- -- Boucle principale pour écouter les commandes
- while true do
- local senderID, message = rednet.receive()
- if message == "ping" then
- rednet.send(senderID, "pong") -- Répond au ping pour être détecté
- elseif message == "on" then
- redstone.setOutput("right", true) -- Allume la lampe (modifie "right" selon la configuration)
- elseif message == "off" then
- redstone.setOutput("right", false) -- Éteint la lampe
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement