This week we planned to create our new mechanism with the help of the two servos we are using to drive the arms of the mechanism. This was the plan but due to Amazon losing our second servo in the post and then Amazon losing our soft toy where the mechanism would be housed we had to make adjustments to what we were going to do with our time.
So, our inputs that we decided on are sound and proximity. The idea is that when an object was within a set distance, the sound sensor would activate and if the sound was above a certain threshold it would then curl up.
So producing the code for actuating a servo with sound can be found below. A simple code that will read the audio from a sensor and then produce angled movement from the servo.
due to the absence of our parts from amazon we decided that to make up for that we would generate the other code for our ultrasonic proximity sensor.
Tom Bown & Stefan Guiton