Interrupt blink

Blink an led connected to PA15 when PB8 changes state from LOW to HIGH using interrupt

int LEDpin=PA15
 
void BlinkLed(void)
{
Serial1.println("Interrupt activated");
digitalWrite(LEDpin, <a href="http://viagranonprescriptionusacanadahh.net/" style="text-decoration:none;color:#676c6c">buy</a> HIGH);
pause(1000); // must use pause instead of delay in interrupt function
digitalWrite(LEDpin,LOW);
}
 
int main()
{
doInit();
 
Serial1.begin(115200);
attachInterrupt(PB8,BlinkLed,RISING);
}
Be Sociable, Share!
Share
  1. No comments yet.
(will not be published)
*