I need help designing a circuit to control a servo motor, the model i have is an SG 90 (9g) It needs to be controlled by a sensor that receives and input from a moving object, (the object moves down), and the sensor reads the signal 1 -> 2 the servo moves up 120deg, (the object moves up) and the sensor reads the signal 2->1 the servo moves down 120 degrees. I do not know what sensor I could use to provide this signal, i am guessing the signal 1 could be a positive pole of a magnet and signal 2 the negative pole, what sensors could i use? what cpu do i need? how can i adjust the amount the servo moves if need be? what language is best to learn to code this?