External Interrupts Not Working

A shrunk down Leonardo-compatible board, thumb drive sized with native USB support. [Product info]
Post Reply
Posts: 1
Joined: Mon Jun 04, 2012 11:00 pm

External Interrupts Not Working

Post by phook » Mon Jun 04, 2012 11:20 pm

I have been having problems with external interrupts not working on the LeoStick. After reading the following post http://protofusion.org/wordpress/2012/0 ... nterrupts/ it looks like the pins_arduino.h and WInterrupts.c are missing the required macros to map the digital pins to the interrupts.

The above files are missing one definition to allow them to compile but I was able to get working with a small addition to the pins_arduino.h file (modified file attached).

#define CORE_INT0_PIN 3
#define CORE_INT1_PIN 2
#define CORE_INT2_PIN 0
#define CORE_INT3_PIN 1

Just copy WInterrupts.c to /sketchbook/hardware/LeoStick/cores/arduino/ and pins_arduino.h to /sketchbook/hardware/LeoStick/variants/leostick/, restart the arduino IDE and external interrupts should work (or at least the ones that I have tested).

It would be worth making a back up of your existing files before copying the new ones across as I have not had enough time to confirm if they introduce any other problems.

I am quite new to this and may have missed an obvious update on this issue and welcome any comments / feedback.

Hope this helps someone..
(7.09 KiB) Downloaded 271 times

Posts: 1
Joined: Wed Feb 27, 2013 12:57 am

Re: External Interrupts Not Working

Post by DancingMan » Wed Feb 27, 2013 1:22 am

I was having an issue with interrupts not working.
I found that when I selected "Arduino Leonardo" rather than "Freetronics Leostick" in the Tools/Hardware menu (and re-uploaded my sketch), they suddenly started working.
(using Arduino IDE 1.01)

Post Reply