Output

From Control Systems Technology Group
Revision as of 01:22, 14 March 2016 by S141268 (talk | contribs)
Jump to navigation Jump to search

Back to main page: PRE2015_3_Groep4

To the input: Input

To the code: Code

Light Brightness

Heating

Play Sound

The best way to produce sound with an Arduino unit is probably by using the Sparkfun MP3 Player Shield, which is an extra circuit board for the Arduino which can play MP3 files from a microSD card. The costs, however, are $25, which is too much unless the TU happens to have one we can borrow, which we will find out as soon as possible. But it’s best to consider cheaper options. More info about this product can be found at https://www.sparkfun.com/products/12660.

The SparkFun MP3 Player Shield

The Arduino has one function that’s widely used to produce sounds, namely tone(). This function can be used to produce tones of a single frequency. A duration can be added as a parameter or the tone can be stopped by using the function noTone(). Multiple tones can be combined to form more complex noises, but playing a tune with chirping birds or something to wake someone up would probably be too difficult. More info about the tone() function can be found at https://www.arduino.cc/en/Reference/Tone.

To create a tone, a simple speaker or a piezo buzzer will do. This one here seems promising, and cheap: only €1,95 (€0,97 with the discount at the moment). And if that won’t do, there are a lot of similar modules for sale on the internet.

Buzzer module for Arduino

Feedback Statistics

Graphic Simulation