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 !!

 

Fer Alvarez
Fer Alvarez
7
| 0 0 0
Asked on 3/10/16, 8:16 AM
0
vote
1054 Views

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.

 

 

Red Millikan
Red Millikan
7
| 0 0 0
Answered on 4/21/16, 6:21 PM
0
vote

Thank you!

So, i have to manage the rising/falling edge by my own?

A tutorial about interrupts in Industruino will be appreciated!

 

 

Fer Alvarez
Fer Alvarez
7
| 0 0 0
Answered on 3/10/16, 2:02 PM
0
vote

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

Tom
Tom
5210
| 0 0 1
Answered on 3/10/16, 12:05 PM
0
vote

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!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

21 follower(s)

Stats

Asked: 3/10/16, 8:16 AM
Seen: 1054 times
Last updated: 5/3/16, 6:14 PM