Created Wed, 09 Dec 2015 00:00:08 +0000 by Machine_2
Wed, 09 Dec 2015 00:00:08 +0000
This is a really newbie question. How do I test the interrupts on the Uno32?
I've read the documentation and it says that INT0, interrupt 0, is located in the pin number 38. Here's the code I'm using
int pin = 43;
volatile int state = LOW;
void setup()
{
pinMode(pin, OUTPUT);
attachInterrupt(0, funcion, CHANGE);
}
void loop()
{
digitalWrite(pin, state);
}
void funcion()
{
state = !state;
}
Now, to test it I've been wiring the 3v3 pin of the Uno32 to the pin 38, the second led should change state when I insert/pull the wire, but nothing happens. Any help is appreciated
Wed, 09 Dec 2015 00:28:08 +0000
The PIC32 doesn't have the concept of a CHANGE interrupt, only RISING or FALLING. You won't get anything to happen using CHANGE.
Sent from my SM-T555 using Tapatalk
Wed, 09 Dec 2015 00:41:28 +0000
The PIC32 doesn't have the concept of a CHANGE interrupt, only RISING or FALLING. You won't get anything to happen using CHANGE. Sent from my SM-T555 using Tapatalk
Oh, I see. I saw this page [url]http://www.eecs.wsu.edu/~schneidj/chipKIT-reference/AttachInterrupt.html[/url] and I thought it was Uno32 compatible. However it still doesn't work with Falling nor Rising.
Wed, 09 Dec 2015 10:23:37 +0000
That documentation is just a re-skinning of the old Arduino documentation. It is not chipKIT documentation, no matter what it may look like. Not only is it out of date, big chu ks of it are completely wrong since they are for the Arduino and not the chipKIT.
Sent from my SM-T555 using Tapatalk