Arduino Photoelectric alarm KY-010 sensor

Hello world! i made a simple example on the KY-010 Photoelectric / Photointerrupter sensor. Arduino Photoelectric alarm. Schematic: Parts list: Arduino Uno, I used the RobotDyn Uno. KY-010 Photo Electric sensor. KY-016 RGB Led or any other leds will do. Buzzer Jumper wires. Code: