Arduino code, does sensor signal processing