Cayenne Dashboard

Dear I know this that I have to use some timer function and loops…I wanna know what to do with the code…Add the code in my given code if that works…A quick help is appreciated…

Thanks