Final

current output in debug mode:
printf("\nFilterAvg: %d", getFilterAvg());
printf("\nStatus: %d", tempStatus);
printf("\nDeviation: %d", deviation);