Arduino code (C) for a simple oscilloscope