I don’t believe that you CAN use analogRead() in Processing. The analogRead() function is an Arduino-specific function.
this block is doing it.
No, it isn’t. That block is calling Firmata::analogRead(), which is a completely different function.
Now, I will agree that Firmata::analogRead() sends a message to the Arduino, asking it to perform an analogRead() function call, and to return the value from analogRead().
The output from Firmata::analogRead() is a value in the range 0 to 1023, despite the comment you added.
if you had 18bits of information to send from the arduino to processing how else could you do it if the firmata analogread function is inadequate?
Information on the Arduino is stored in variables that come in specific sizes, all of which are multiples of 8 bits. A byte is 8 bits. An int is 16 bits. A float or a double are 32 bits, as is a long. So talking about 18 bits of information from an Arduino is meaningless.
If I was having trouble using Firmata to get the data from the Arduino, well, I’d give some serious thought to s**tcanning Firmata, and developing my own protocol for the Arduino and Processing to communicate.
But, if you think you are stuck with Firmata, explain where the “18 bits of information” are coming from, and we might be able to help you get the data from the Arduino to Processing within that straight-jacket’s limitations.