added setInterval and updateRssi function