I'm not sure how to wire it up to A5 on my Espruino Pico to monitor audio. I'm using a 9V battery as a power source on a breadboard and placing the output on the A5, and then also supplying BAT_IN with the same power source and GND to the negative terminal on the battery. When wired up, I get constant values so I must be doing something wrong.
Here's the code I'm using:
console.log("BEGIN");
var on = false;
setInterval(function(){
var a = analogRead(A5);
console.log(a.toFixed(2));
if(a > 0.5){
on = !on;
LED1.write(on);
}
}, 100);
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm trying to figure out how to wire up a basic electret microphone element from Radioshack:
http://comingsoon.radioshack.com/electret-microphone-element-with-leads/2700092.html
I'm not sure how to wire it up to A5 on my Espruino Pico to monitor audio. I'm using a 9V battery as a power source on a breadboard and placing the output on the A5, and then also supplying BAT_IN with the same power source and GND to the negative terminal on the battery. When wired up, I get constant values so I must be doing something wrong.
Here's the code I'm using: