Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define OUTPUT_PIN 9
- #define INPUT_PIN 0 //This is actually digital pin 2!
- volatile int value = LOW;
- void blinkLed(){
- value = !value;
- }
- void setup(){
- Serial.begin(9600);
- pinMode(OUTPUT_PIN, OUTPUT);
- attachInterrupt(0, blinkLed, LOW);
- }
- void loop(){
- Serial.println(value,HEX);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement