can you show the sensor print out by processing?
do you get anything but not reach the limit 1000?
when you upload the code to arduino UNO ( should be same in that respect )
did you start the monitor and check the raw data send from arduino?
pls print and show here.