-- GPS Broadcaster using Rednet -- Run this on your Pocket Computer -- Open rednet on the modem rednet.open("back") -- Change to your modem side if needed -- For pocket computers, try: rednet.open("back") or rednet.open("front") print("=== GPS Rednet Broadcaster ===") print("Broadcasting GPS via Rednet") print("Press Ctrl+T to stop") print("") while true do -- Get GPS position local x, y, z = gps.locate(5) if x then -- Create message with coordinates local position = { x = x, y = y, z = z } -- Broadcast to all devices (no specific ID) rednet.broadcast(position, "gps_update") print(string.format("Sent: %. 1f, %.1f, %. 1f", x, y, z)) else print("GPS failed - check satellites") end -- Wait 2 seconds before next broadcast sleep(2) end