help me correct the code

Job ID: 34222280

Budget: $10 – $30 CAD

I have made almost 75% of the code but it is not working so i need some one to help me correct the code, it is based on c programming using FRDM-K64F. I need just help with the logic, there is no need to worry about the libraries and the syntax