About interrupts in Industruino Ind I/O
Hi, my question is very simple:
Can I use interrupts in the industruino as if it were a standard leonardo?
I recently purchased several industruino Ind I/O modules for use in machines as datalogger.
I have a Sketch (which handles an interrupt) now working in the Arduino Leonardo, and I want to use the same source code for the industruino. The only question I have, is how to handle my interrupt in the industruino.
Can I use attachInterrupt(1, setSpeed, FALLING); in Industruino pin 2, as if it were a Leonardo?
where setSpeed manages pulses from a solid state relay:
void setSpeed() {
long t = micros();
speedDigMicros = t - previousPulse;
previousPulse = t;
}
If not so, how can I do it?
THANK YOU !!
You probably will have to debounce the detector signal.
The best way for me was to connect the detector to a solid state relay, which does not generate rebounds. The detector activates the relay, which sends a clean signal to the digital input.Also you can do it via software, discarding interrupts generated with a difference of less than 3000 microseconds.
Thank you!
So, i have to manage the rising/falling edge by my own?
A tutorial about interrupts in Industruino will be appreciated!
Hi Fer, the interrupts are handled differently on IND.I/O as the digital I/O passes through an expander, please check Loic's answer at https://industruino.com/forum/help-1/question/indio-digital-input-interrupt-usage-31
and https://industruino.com/forum/help-1/question/indio-digital-interrupt-noise-76
regards- Tom
Your answer
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
Keep Informed
About This Forum
This community is for professionals and enthusiasts of our products and services.
Read GuidelinesQuestion tools
Stats
| Asked: 3/10/16, 8:16 AM |
| Seen: 4488 times |
| Last updated: 5/3/16, 6:14 PM |