Updated upload.lua to use a map peripheral if detected