Firmata with Arduino Mega 1280, cannot read all input pins

I received Arduino Mega 1280 and want to communicate with him through Firmata. It sounds simple ...

So, my problem is: if I use the standardFirmata firmware for Arduino, which is included in Arduino 1.0, I can set the output pins and send them a signal ((highlighting the LED on pin 24):

arduino.digitalWrite(24, Arduino.HIGH);

But I can not read the digital input from my Mega. As I found out, some people had a problem reading on ports above 13. I can’t verify this, my input signals start from port 23. Example:

if (arduino.digitalRead(25) == Arduino.HIGH){
  println("is high");
  }

Now I installed AllInputsFirmata on my Mega, it is also preinstalled in Arduino 1.0. Now there is no problem reading from a digital input: for example:

if (arduino.digitalRead(25) == Arduino.HIGH){
  println("is high");
  }

But this time I can’t send a signal.

So what is going on?

(, FirmataTest, !)

+5
1
0

All Articles