-changed udp function to uint8_t from void and moved some parameters to the main loop.