Issue with reading Arduino Port

yes,

  • in the first code you load the firmata lib to processing sketch but not use it,
    ( and all lines what contain the word "arduino " should be removed )
    using the serial lib only works for you / as you test it against your own arduino code?? /

  • in the second code you use the firmata lib,
    but not say that you uploaded firmata to arduino, so it can not work!

also when you tested my processing firmata example,
did you upload the standard firmata to arduino first?
like i show detailed in that many pictures blog extra for you?