Week 13:
Interface and Application Programming

For my final project, I am planning to create tiny motorized dancing insects that responds to your footsteps and moves in certain patterns based on the number of your footsteps. This week I tried using sound sensor and motors with ATTiny 44 and 45. For the interface part, I was planning to show the motion of insects in the form of drawing.


SAM_0359
Motor
SAM_0369
SAM_0360



Programming 2 motors to start moving in forward and reverse direction alternately



Here is the Arduino code Motor


Using a sound sensor

I first recreated Neil's electret mic board and tried to check the input data. When I used the python script, I was able to see varying values from the sensor in the form of waves.

Screen Shot 2013-11-30 at 9.44.51 PM

However, when I tried to read the values from arduino serial monitor, I was getting just a constant value.

Screen Shot 2013-12-01 at 5.12.45 PM

I checked the code, it worked fine with light sensor but it wasn't working for the electret microphone. I asked around and someone mentioned that there is some compatibility issue with Attiny 45 and Arduino serial monitor. Jie suggested that I attach an LED and use that as an output to check the level of sound. Here is her amazing tutorial.
I attached an LED and a tiny DC motor to the electret board and it worked. The motor is on and LED is off, when the sound level rises, motor stops spinning and LED turns on.
Here is the video




Designing a board with 2 DC motors and LED

SAM_0360
more to be added...