I used this code I found on the Arduino site, but it does not work on my board. It does not blink the LED. If I download the regular blink sketch, it works. I am doing this in windows 7 and though it has worked in the past I have been having trouble the last few days. If I try to upload a sketch without holding down the 'L' key, it will not load and I get a protocol error something about expecting 0x14, received 0x51. If I hold the 'L' key down for verbose output, it seems to load and the blink sketch works, but I am unable to get this interrupt program to work. Is there something wrong with this program? It looks like it should work.
:~
int pin = 13;
volatile int state = LOW;
void setup()
{
pinMode(pin, OUTPUT);
attachInterrupt(0, blink, CHANGE);
}
void loop()
{
digitalWrite(pin, state);
}
void blink()
{
state = !state;
}