The Schedules have to be saved in the ram storage of the PIC. There is already a structure defined. the values of this structure has to set the desired inputs for the state machines.
(the function has to be inside of the while loop, when a new schedule comes in set a flag to update)
desired_temp = sched.temperature;