Activity › Forums › Questions & Troubleshooting › Software & Firmware › Controllino Interrupt
-
How to access interrrupt pins in Controllino Mega??
Are the Interrupts 0 , 1 ,2 and 3 only accessible at the X1 terminal?
Any other interrupt other than interrrupt 3 and interrupt 4 accessible at the screw terminal?
What should be the voltage input if i am accessing an interrupt 0,1,2 or 3 at the X1 terminal?
What is the syntax to initialize the interrupt pins 0,1,2,3
I can can access the interrupt 3, 4 in Controllino using the code
CONTROLLINO_IN0 and CONTROLLINO_IN1.
what is the syntax to access other interrupt pins?
-
Hi Elvis,
CONTROLLINO MEGA is compatible with Arduino Mega/Mega2560. So the Arduino pins usable as interrupts are 2,3,18,19,20,21 as you can see here.
When you check the CONTROLLINO pinout table here you can see that pins 2, 3 are used for Outputs so you cannot use them as screw terminal inputs. But you can use them as inputs at the pinheader X1. Pins 18 and 19 are mapped to screw terminal inputs IN0 and IN1. Here you can trigger them by 12/24 V depending on the supply voltage you use. Please note that they have an internal pull down in the CONTROLLINO circuitry. Pins 20,21 are accessible at pinheader X1. At X1 you need 5V to trigger the signals.
Good luck!
Lukas
-
Please note that function attachInterrupt() does not need a number of pin (e.g. CONTROLLINO_IN0), but the number of interrupt defined in the table here (which is 5 in this case). Or you can use function digitalPinToInterrupt() to convert the pin to int for you.
Log in to reply.