Week 2

Digital and Analog Input and Output

The things I have:
Force sensor

Right angle gear motor
I tested the force sensor, potentiometer for analog input and pushbutton for the digital input. Then I added the speaker to illustrate the tone floating with potentiometer.
I read the analog output of force sensor and map the value to the rotation state of microservo.
I use the potentiometer to control the right angle gear motor of 12V to experiment with the power supply other than laptop. The tansistor can only by TIP120 or MOFSET, I have used the 2N 3906 and the motor can’t work until I temporarily charge it at full voltage.
Sensor Change Detection

1. Detect button state changes
2. Count button presses
3. Long press, Short press
4. Sensor threshold detection
5. Detecting a peak