Issue with reading Arduino Port

and when you test your second processing code
( what also is a firmata code )
you changed arduino also from your sketch to firmata?

when your processing gives you a 0.0, did you measure voltage at that arduino pin?

//____________
anyhow i try to play with your "second code "
and yes, i got 0 too!!

now that was bad, as i just

  • loaded firmata

  • test my sketch and connect A0 to 5V and all ok

  • test your sketch and it did not work…
    so i play until i see something,
    it was the baud rate ! 57600 !
    see all arduino ( firmata ) examples have that rate and
    http://playground.arduino.cc/Interfacing/Processing
    here too, even suggest you can omit that parameter?


yes the first reading again was 0.
but then it worked fine.

and that again let me think why my code did not work in your setup?

  • did you do the jumper cable?
  • did you press the button?