Help to Ping only every 5 sec, and also how to send digits to my 7-seg.display!?

AWOL: I know, I was just testing.. snipped the code from an old workfile.

PaulS: I have almost no skills with coding. I dont quite understand how I managed to make the code "semiwork" like it is now...
The compiler said something, but I didn want to spend any more time on that issue because there maybe a much smarter way all together...