I wanted to do something that had an output slightly less annoying than a piezo buzzer. My lab had some offset weight motors they were experimenting with for another project, so I put one inside a borrowed stuffed animal with the FSR taped to it, and programmed the Arduino to take the input from the FSR and PWM the offset weight motor to cause the wombat to vibrate. The motor takes more power than the Arduino can output, so I used the Darlington Transistor to convert the PWM output and amplify the output from two AA batteries, which powers the motor.
Lab 5 : Piezo Speaker by Victor Tjhia
Playing piezo with potentiometer
Piezo speaker will produce different melody as you spin the potentiometer
components:
- arduino
- piezo speaker
- potentiometer
Reads a specific sequence of notes. Based on how fast you hit a surface next to a photo sensor, the code speeds or slows the tempo of the melody. A green LED turns on with fast tempo, and a red LED turns on with slower tempo. The "motion" sensor consists of a beam of light projected directly to the photo sensor.
Materials:
-Photosensor
-Cardboards
-Tape
-Headlamp
-LEDs
-Piezo Speaker
Attached potentiometer to speaker, adding an LED, and a pressure sensitive LED as a rudimentary game of simon.
Joe
Here is the code:
Description
Uses photocell and FSR to control the tempo and melody of the sound generated from the speaker.
Material Used
1 photocell
2 10K resistors
Piezo speaker
Code
Description:
I created a toy (prototype) hand which will play music. The volume of the music depends on how hard you squeeze it. If you squeeze harder, the music will play louder. If you squeeze softly, it will play softer. And, if you don't squeeze, the volume is 0.
Components used:
Code:
Processing
/*
keyboard - modified.
Plays a pitch that changes based on a changing analog input from a FSR and a photo cell
circuit:
* 1 photocell
* 3 10K resistors
* 8-ohm speaker on digital pin 8
created 21 Jan 2010
Modified 4 Sep 2010
by Tom Igoe
This example code is in the public domain.
http://arduino.cc/en/Tutorial/Tone3
*/
Description
Synesthesia is a neurological condition in which stimulation of one sensory/cognitive pathway leads to an involuntary experience in a secondary sensory/cognitive pathway. The Synesthetic pitch sensor was created to serve as a model for this concept, specifically color synesthesia relative to sound. A photocell is employed as an analog input to control the pitch from the output piezo speaker. RGB LEDs are then utilized to illustrate a certain color corresponding with what pitch is heard by the user.