code help please

The set up and loop functions, etc....are what I need help with -