1

I've been trying to get all of Adafruit Circuit Playground's sensors to work with the Johnny-Five node.js library and Firmata.

However, when I try using its sound sensor, Button 4 stops responding. That is, in every code snippet I make, whenver I define the following:

var sound = new five.Sensor("A4");

Button 4 does not work at all. If I comment that out, Button 4 works. I define Button 4 with:

var button4 = new five.Button(4);
button4.on("down",function(){
  g_storage.pin4=1;
});

I made Arduino C code that uses the Sound Sensor and Button 4 simultaneously and it works. So I don't think this is a physical issue. Even in the example code presented in https://www.npmjs.com/package/playground-io , the button 4 does not work until I comment out the sound sensor.

Has anyone seen this before? I'd think that Button 4 - on digital pin 4, and the Sound sensor - on Analog pin 4, would never affect each other.

0 Answers0