Output Devices

Assignment for this week is:
add an output device to a microcontroller board and program it to do something

For this week assignment I chose to work with a speaker device and connect it to an Arduino board to do something.

I used two kinds of speakers:

The first one is more like a buzzer (and sound like one)

Buzzer-SFM-27-A-      arduinobuzzer3

And a more expensive one that also sound much better
GC0351M_sml  arduspeaker3
I found a very nice code sample for playing a melody with this setup (find code
here … ).

I learn from this code the right frequencies needed to generate different tones.

Next – I wanted to turn my laptop keyboard to “electric organ” keyboard.

I changed the program for the Arduino board: PlayFromKeyBoard Arduino code.

And added some Processing code too that listens to my keyboard actions and transmit it to the board (an extra mile for the Processing cod would be adding some visual interface on screen to the keyboard…): PlayFromKeyPlayBoard Processing code.

I chose the key on my laptop to be translated to tones and marked them with little stickers with the notes names. I assigned one for playing a pre-programmed tune (in the arduino program).

arduinobuzzer2

 

This is how it works:

This small assignment ignited my imagination (!) and I think now to take a completely different direction for my final project.

I want to make a BIG floor piano keyboard that play as you step on it ….

And that is it …