Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- }
Advertisement
Add Comment
Please, Sign In to add comment