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 !
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.
Do you maybe mean Arduino UNO? Otherwise, could you provide us with a link of Arduino Neo? I'm very curious about it
Hi there, it works fine if you follow this tutorial: https://www.arduino.cc/en/Reference/AttachInterrupt Always remember that Arduino.cc is a reliable source of inspiration and solutions for UDOO projects based on Arduino DUE
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; }
the interrupt with udoo is like Arduino, and how many pins I can use for interrupt? how many interrupt has udoo?
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.
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.
I try to do an interrupt but I get the error message " 'CHANGE' was not declared in this scope", what is the problem?
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?
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?