You are reading a single comment by @user56792 and its replies. Click here to read the full conversation.
  • I'm trying to figure out how to wire up a basic electret microphone element from Radioshack:

    http://comingsoon.radioshack.com/electre­t-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:

    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);
    
About

Avatar for user56792 @user56792 started