if I se the MAIN spawned window.. I get this error:
error: expected unqualified-id before string constant In function 'void setup()':
At global scope:
this code:
int pin = 13;
int iPin = 2;
volatile int state = LOW;
void setup(){
Serial.begin(9600);
pinMode(pin, OUTPUT);
pinMode(iPin, INPUT);
digitalWrite(iPin, HIGH);
attachInterrupt(0, ISR, HIGH);
}
void loop(){
if(state == HIGH){
Serial.println("--EVENT TRIGGERED--");
digitalWrite(pin, state);
delay(500);
state = LOW;
}
}
void ISR(){
state = HIGH;
}