Forum Controllers/PLC


This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.


M-Duino Input I0_0 problem

Nick Dragan

HI everyone ! 

I am trying to see the change in status of input I0_0 which is one of the opto isolated ones.

I have flipped the DIP switch from PIN 2 to I0_0 (I mean flipped to ON position).

I am using a 12V signal connected with GND to the (-) part of I0_0 and 12V to the I0.0 part.

The input LED is turning on whenever I activate the signal but the serial monitor does not show the change of state. For this I am using the digitalRead(I0_0).

 I have tried with digitalRead(2) and all sorts. The LED is turning on but it seems the board does not see this change.

To test the setup I have done a simple program to trigger one of the relays when the input changes state. The program works if I use any of the non-opt isolated (I0_2, I0_3, I0_4, etc.).

I am completely puzzled by this as it seems much harder to get this working than it should be.

Any suggestions ?