Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modemSide = "back" -- Côté sur lequel le modem sans fil est attaché
- local channel = 23654 -- Numéro de canal pour la communication sans fil
- rednet.open(modemSide) -- Ouvrir le modem pour la communication sans fil
- local x, y, z = gps.locate(5)
- if x then
- local position = "{x=" .. tostring(x) .. ", y=" .. tostring(y) .. ", z=" .. tostring(z) .. "}"
- local message = "Position:" .. position
- rednet.broadcast(message, "Position")
- end
- while true do
- sendPosition() -- Envoie la position actuelle
- sleep(2) -- Attend 60 secondes avant la prochaine mise à jour de la position
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement