Introduction: Linkit One Musical Organ
In this instructable I would be telling you how to make a simple musical organ. This thing works upon the distance. As the distance of your hand increase from it, it plays various notes. Their is a simple buzzer attached which is used to play the musical notes. I garranty you that making this project will really be fun. Make it and play with it.
Step 1: Gather Parts
Here are the parts required by you:
- Linkit one
- Ultrasonic sensor
- A simple buzzer
- Jump cables
Step 2: Connecting Ultrasonic Sensor
A ultrasonic measures the distance using sound waves. Their is a pair of transmitter and receiver. The transmitter sends sound wave and it strikes the from a object and is returned. The returned sound wave is received by the receiver. From the time taken, we calculate the distance. Here we would be using it to measure the distance and set the note played by the buzzer according to the distance. Connect the ultrasonic sensor to your board as said:
- vcc of module-----vcc of linkit one board
- gnd of the module-----gnd of the board
- echo pin-----digital pin 8
- trig pin-----digital pin 7
Step 3: Connect the Buzzer
To play musical note a buzzer is used by me. You can also use a speaker with a amplifier which would be even a better option. I had a buzzer lying around me so I decided to use it instead of a speaker. Connect gnd of the buzzer to ground and positive of the buzzer to digital pin 3.
Step 4: Upload the Code
Now its time to upload the code. After uploading the code, bring your hand near to it. The range of each note is about 7cm. Move your hand towards or away from the buzzer and you will be able to hear the different musical notes.
#define trigPin 8
#define echoPin 9
pinMode(trigPin, OUTPUT) ;
pinMode(echo pin, INPUT) ;
if (distance<70 && distance>7)
Step 5: END
This is the end of this instructable.Hope you liked it and loved it also. For any query and problem comment below.
We have a be nice policy.
Please be positive and constructive.