Go Down

Topic: Audio record and playback (Read 1 time) previous topic - next topic



I'm trying to achieve audio recording and playback with the Arduino. Of course, I don't expect a very high sound quality, but right now what I get just doesn't work at all.

For now, I followed the advices in the following post: http://a.parsons.edu/~chainreaction/?p=143, so I tried pluging my laptop headphones output in the Arduino. It seems to be partially working: I can see the value from analogRead() change when there is sound. With the following code, I also get "something" from the output that is a bit like the input (although its very noisy):

Here is my code:

#define AUDIO_INPUT 0
#define AUDIO_OUTPUT 9

int audioIn;

void setup() {

void loop() {
audioIn = analogRead(AUDIO_INPUT);
analogWrite(AUDIO_OUTPUT, audioIn);

The problem I seem to have now is that the sampling rate of analogRead() seems to be very slow according to the following post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1167113121/9#9. It seems to take at least 1 ms.


Try Arduino 0008 - the delay's been removed so analogRead() should be much faster.


I also get "something" from the output that is a bit like the input (although its very noisy):

Have you gotten any further with this?

I'm trying the same thing and, while I don't expect much quality, it seems way worse than it should be.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131