would this work as a way to send data to Processing?
Yes.
Is there a better way?
Get rid of the delay().
... but it isn't working as intended.
I'm surprised it works at all, since there is no draw() method.
I would like the value to be updated each time it changes. Now it is just "printing" of top of the old one...
Perhaps you should clear the screen between calls to text().
How would it be possible to write the values to a file instead of displaying them on screen?
That would be a Processing question, wouldn't it? There are dozens of examples with Processing. I'm sure some deal with files.