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

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

shortcuts: alt+s submit/post or alt+p preview