Interrupt on udoo

Discussion in 'Arduino IDE' started by sebastien28, Jul 20, 2015.

  1. sebastien28

    sebastien28 New Member

    Joined:
    Jun 17, 2015
    Messages:
    10
    Likes Received:
    0
    Hi,
    I'm sebastien. I had to use a program with interruption on one pin, it's work great on my arduino neo with
    attachInterrupt(0, myfunction, RISING);

    I heard that on arduino due all pin can be put on interrupt, so my code is :
    attachInterrupt(25, myfunction, RISING);

    But it doesn't work on udoo :(

    Am i doing something wrong ?
    Any help would be very welcome !
     
  2. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Hi there sebastien28,
    what do you mean by Arduino Neo?
     
  3. sebastien28

    sebastien28 New Member

    Joined:
    Jun 17, 2015
    Messages:
    10
    Likes Received:
    0
    My code is based on an arduino neo code( wich work on it) with interrupt, so on my udoo i use the same code with android app control.
     
  4. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Do you maybe mean Arduino UNO? Otherwise, could you provide us with a link of Arduino Neo? I'm very curious about it :)
     
  5. sebastien28

    sebastien28 New Member

    Joined:
    Jun 17, 2015
    Messages:
    10
    Likes Received:
    0
    Yeah arduino uno :) confusion with udoo neo :)
     
  6. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
  7. sebastien28

    sebastien28 New Member

    Joined:
    Jun 17, 2015
    Messages:
    10
    Likes Received:
    0
    works thanks
     
  8. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Your welcome!
     
  9. Alessandro

    Alessandro New Member

    Joined:
    Apr 19, 2016
    Messages:
    4
    Likes Received:
    0
    how many interrupt has udoo?
     
  10. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Which Udoo?
     
  11. Alessandro

    Alessandro New Member

    Joined:
    Apr 19, 2016
    Messages:
    4
    Likes Received:
    0
    maybe is quad the chip is atmel AT8AM3X8F
    Tanks Ale
     
  12. Alessandro

    Alessandro New Member

    Joined:
    Apr 19, 2016
    Messages:
    4
    Likes Received:
    0
    Can I have any example to use interrupt with this udoo?
     
  13. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    The example as given in the earlier mentioned arduino documentation should work. Important is to use the correct attachinterrupt statement ( with pin)

    const byte ledPin = 13;
    const byte interruptPin = 2;
    volatile byte state = LOW;

    void setup() {
    pinMode(ledPin, OUTPUT);
    pinMode(interruptPin, INPUT_PULLUP);
    attachInterrupt(digitalPinToInterrupt(interruptPin), blink, CHANGE);
    }

    void loop() {
    digitalWrite(ledPin, state);
    }

    void blink() {
    state = !state;
    }
     
  14. Alessandro

    Alessandro New Member

    Joined:
    Apr 19, 2016
    Messages:
    4
    Likes Received:
    0
    the interrupt with udoo is like Arduino, and how many pins I can use for interrupt? how many interrupt has udoo?
     
  15. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    The Udoo Quad is like a Arduino due so every digital pin has an interrupt possibility. According my information it has 32 digital pins so 32 interrupts.
     
  16. Agustin Lagos

    Agustin Lagos New Member

    Joined:
    Jun 25, 2016
    Messages:
    4
    Likes Received:
    0
    How many pins can be used for interrupt in udoo neo?
     
  17. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    According the Arduino attachinterrupt documentation it are 2 pins but as the Neo Arduino Uno compatibility is somewhat experimental it could be 0 to 13 (all digital pins). So please do a test on your Neo and share the results so we all know.
     
  18. Agustin Lagos

    Agustin Lagos New Member

    Joined:
    Jun 25, 2016
    Messages:
    4
    Likes Received:
    0
    I try to do an interrupt but I get the error message " 'CHANGE' was not declared in this scope", what is the problem?
     
  19. Agustin Lagos

    Agustin Lagos New Member

    Joined:
    Jun 25, 2016
    Messages:
    4
    Likes Received:
    0
    In fact, I have no problem compiling the program with interrupts usin RISING, FALLING, HIGH or LOW, but it doesn't work with CHANGE, any thoughts?
     
  20. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    As said, the Arduino part of the Neo is experimental. After compiling does it work? Compiling is one thing, it has to work too. On what pins did you test?
     

Share This Page