Added a full .c file and fixed several variable name errors.  Also implemented my main.c file.  Should be very close to working.  Need to continue adjusting sensor sensitivities.