getDigital from firmata giving -1 or crashing

I’m trying to use a button from an arduino to trigger an event in oF.
But all I get from getDigital is -1 in codeblocks and if I use VS c++ 2008 express it crashes once I press the button.

I checked with the test application at and I have the button setup right to trigger high/low properly.

I tried using this firmataExample code and this:

Also tried with a potentiometer reading the getAnalog and that works perfectly fine.
Not sure where to go from here.

how are you wiring the button?

Afaik the OF arduino stuff is all working fin so if the firmata on your board is working well, There might also be something wrong with your Arduino or with the button. You might try just making a simple Arduino sketch to light an LED when the button is pressed to check that.

It’s setup with a resistor like in the arduino example
I was working with some other oF developers and we ended up going with ofSerial instead.
Things are working fine now.