SparkFun Forums 

Where electronics enthusiasts find answers.

Your source for all things Atmel.
By keithg
#82271
I have tested an LM386 circuit with multimeter and a small speaker so I know it is functional but I can't read meaningful values with this code
Code: Select all
void setup() {
   Serial.begin(9600);
}

void loop() {
  
  int soundLevel =  analogRead(0) -512;
  
  Serial.print( "soundIn = ");
  Serial.println(soundLevel);
 delay (1000);
}

I would appreciate advise.  Thanks.
By Liencouer
#82449
What are you trying to accomplish? How is the speaker/audio amp related to the analog input? What do you have hooked up to analog pin 0?
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]