2 Replies Latest reply on Oct 21, 2014 8:24 AM by mhahn

    galileo gen 2 external interrupts

    yoonkw

      Hi,
      I'm working on galileo gen2 board.
      attachInterrupt() does not work.
      please help me!

       


      Here is my code. i am using sketch.

      --------------------------------------------------------------------
      int led = 13;
      int inputPin = 2;
      volatile boolean value = LOW;

       

      void setup() {
        pinMode(inputPin, INPUT_PULLUP);
        pinMode(led, OUTPUT); 
        attachInterrupt(0, intHandler, CHANGE);
      }

       

      void loop() {
      }

       

      void intHandler() {
        digitalWrite(led, value);
        value = !value;
      }

      --------------------------------------------------------------------