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

What does this achieve?

  if (photocellreading < 300);