Arduino USB > Firmata > I2C > [GPIO PCF8574 + MCP23017 + temp BMP280]

Well, I have a half-good news and a bad one:

  • yes, the .ino file C code works,
  • but only as long as you do not connect to Node-RED.
void setup()
{
  byte pin;
  for (pin = 0; pin < TOTAL_PINS-2; pin++) {
    digitalWrite(pin, HIGH);
  }

So basically if you give it power, if will not turn on anything.
But if I connect to Node-RED, and try to switch 1 PIN "up", =>> ALL pins switch UP too.
It's like the Node is somehow thinks / saves by default, all other pins are HIGH >> and sending ALL those infos with that one order together.
Or maybe the Johnny5 library does.
(I had no time to investigate the JS code, nor J5 C.)

I think a better solution would be to INVERT the LOW / HIGH behaviour completely.


To identify the boards, here is a workaround, if you are willing to sacrafice 3 PINs:

But after facing so many problems, I have decided:

I'm dropping Firmata completely.

Not suitable for industrial usage.

(The developer wrote wrote this line himself.)