online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#define PIR_PIN 2 #define BUZZER_PIN 3 #define BUTTON_PIN 4 void setup() { pinMode(PIR_PIN, INPUT); pinMode(BUZZER_PIN, OUTPUT); pinMode(BUTTON_PIN, INPUT_PULLUP); } void loop() { // Check for motion if (digitalRead(PIR_PIN) == HIGH) { triggerAlarm(); delay(5000); // Wait for 5 seconds to avoid triggering the alarm multiple times } // Check button press if (digitalRead(BUTTON_PIN) == LOW) { stopAlarm(); delay(1000); // Debounce delay } } void triggerAlarm() { digitalWrite(BUZZER_PIN, HIGH); } void stopAlarm() { digitalWrite(BUZZER_PIN, LOW); }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue