Filtering only big changes (Processing)

PaulS:

I will do it without subtracting the 500 then, no tampering with the results then.

There isn't any problem with subtracting 500 from the value. Just change the from range in the map() call to match what you are actually mapping FROM.

My guess is that the professional chart you show is based on measuring values from the pulse oxymeter far more frequently than you are, and not converting those values to strings, sending them over a serial port, and converting them back to floats. I'm guessing, too, that there is some smoothing going on in hardware, not software. Finally, I'm guessing that the professional chart is using a sensor for more accurate than what you can afford.

But, I could be all wrong.

I will try a different sampling rate, thanks for the advice,
is there a way to send values without converting to strings? just as raw data?

Semi-Professional oxymeters (hospital-quality) cost less than 20 dlls to manufacture, it literally is just a photodiode and an infra-red LED. probalby R&D oxymeters are higher in price, but commercial ones are capable of the graphs listed above.

and I do have filters in my circuit (hardware circuits), however, given the amount of cables in the circuit itself (the filters are separated from the arduino board, they are in their own board), I assume the cables pick up a lot of noise (AFAIK cables act like antennas and thats why there is so much noise in any cable-transmitted-signal).

What I just want is a code to smoothen that out, I will try playing w the sampling rate for now