Go Down

Topic: My second arduino project : 5 tone piano (Read 1 time) previous topic - next topic

Muneeb

hi,
this is my second arduino project,
its a 5 tone piano.
it was easy for putting some button and a couple of wire but really annoying when i coudnt
put 5 button codes into one sketch.
but i finally found how to do it   :D :smiley-mr-green: :D

heres the link:
http://www.youtube.com/watch?v=Ix-kTAXryJI

CrossRoads

Could be an interesting start to something bigger - add some more buttons playing actual notes (A = 440 Hz), or allow 2 notes to play at one time?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Muneeb

as already said, my other button are deffected.
and i cant play two notes at the same time because i already tryed it.

and really have no ideas to what to make with my arduino.
worst, i dont have alot if time because i'm secondry 2 (grade 8) and im already getting alot of homework and study to do.

CrossRoads

You have 6 PWM outputs, they can be on together - write some code to output a PWM tone when a button is pressed.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

amacmullen14

PWM outputs will only output the same frequency, different pulse width.

Using the Tone library (not the tone() function built in to the IDE) will allow you to play 2 notes at a time easily.  Even 3 at a time is possible, but you won't be able to use millis() and delay(), I believe.  (I could be wrong)

Go Up