ArduinoIOT This code allows an Arduino Mega 2560 to enable/disable 110VAC power in response to photoelectric sensor analog output.