Arduino, Cpp.
schematic diagram: Now the programming: int greenLedPin = 3; int redLedPin = 5; int buzzerPin = 7; int sensorPin = 9; int sensorState = 0; void setup() { Serial.begin(9600); // Set the sensor pin as input pinMode(sensorPin, INPUT); // Set the LED and buzzer pins as output pinMode(greenLedPin,