added encoder.c and encoder.h, if each time the hall effect sensor is triggered a counter counts up until it reaches a certain value