/* 01/12/2021 PhotoInterrupterHY301_21_test Simple Sketch to show the photointerupter is working */ //Variable that will hold the analog reading from Arduino pin A0 int photointerrupterState; void setup() { Serial.begin(9600); Serial.print("PhotoInterrupterHY301_21_test"); } void loop() { photointerrupterState = analogRead(A0); Serial.println(photointerrupterState); delay(500); }