Arduino Zero Crossing Detector Code