Hello,
This is not a so easy just-write-the-code kind of assignment.
This requires the understanding of many components like the temperature sensor, microcontroller, amplifiers, motor driver etc.
And to be frank, it is a bit unfair to except a ready made c program, especially for a project like this.
I suggest you to understand the hardware of those blocks before starting the software part and understand the microcontroller as well.
If you search in the website , Microchip has enough application notes and sample programs to make you understand where and how to start.
And when you find any difficulty once you start, people are here to help you out.
cheers.
all the best.