Output: Difference between revisions
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
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. | 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 linked below 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. | To create a tone, a simple speaker or a piezo buzzer will do. This one linked below 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. http://www.lightinthebox.com/nl/compatibel-arduino-passieve-luidspreker-zoemer-module_p903345.html?currency=EUR&litb_from=paid_adwords_shopping&utm_source=google_shopping&utm_medium=cpc&adword_mt=&adword_ct=87561882434&adword_kw=&adword_pos=1o1&adword_pl=&adword_net=g&adword_tar=&adw_src_id=1810908567_301588514_21687237914_aud-141409042634:pla-117284547555&gclid=CL3Op-jcvssCFcZAGwodaYwGVA | ||
http://www.lightinthebox.com/nl/compatibel-arduino-passieve-luidspreker-zoemer-module_p903345.html?currency=EUR&litb_from=paid_adwords_shopping&utm_source=google_shopping&utm_medium=cpc&adword_mt=&adword_ct=87561882434&adword_kw=&adword_pos=1o1&adword_pl=&adword_net=g&adword_tar=&adw_src_id=1810908567_301588514_21687237914_aud-141409042634:pla-117284547555&gclid=CL3Op-jcvssCFcZAGwodaYwGVA | |||
== Feedback Statistics == | == Feedback Statistics == | ||
== Graphic Simulation == | == Graphic Simulation == |
Revision as of 00:18, 14 March 2016
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 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 linked below 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. http://www.lightinthebox.com/nl/compatibel-arduino-passieve-luidspreker-zoemer-module_p903345.html?currency=EUR&litb_from=paid_adwords_shopping&utm_source=google_shopping&utm_medium=cpc&adword_mt=&adword_ct=87561882434&adword_kw=&adword_pos=1o1&adword_pl=&adword_net=g&adword_tar=&adw_src_id=1810908567_301588514_21687237914_aud-141409042634:pla-117284547555&gclid=CL3Op-jcvssCFcZAGwodaYwGVA