Use Expansion port pin and I/O pin
Hi everyone,
I have an issue that make me crazy...
I use the expansion port pin to control an external drive that control a step motor, and work everithing perfectly, the problem occure when i connected a push button and use the I/O pin to read the button state.
So, when i call
pinMode(2,OUTPUT);
digitalWrite(2,HIGH);
pinMode(3,OUTPUT);
to set the expansion port pin work ok.... but if i call also
Indio.digitalMode(PinOut_EmergencyStop, OUTPUT);
Indio.digitalWrite(PinOut_EmergencyStop, LOW);
Indio.digitalWrite(PinOut_EmergencyStop, HIGH);
Indio.digitalMode(PinRead_EmergencyStop, OUTPUT);
Indio.digitalWrite(PinRead_EmergencyStop, LOW);
Indio.digitalWrite(PinRead_EmergencyStop, HIGH);
Indio.digitalMode(PinRead_EmergencyStop, INPUT);
everything stop working... any idea?
Thanks
Hi,
When using the INDIO please be aware that the it uses an expander for the I/O channels over I2C, which means it uses D2/D3 to drive the I/O channels, and also the RTC if you use that. Please use any other pins on the expansion port, see https://github.com/Industruino/documentation/blob/master/indio.md#idc-expansion-port-pinout
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: 4/13/19, 2:06 PM |
Seen: 2061 times |
Last updated: 4/14/19, 3:44 AM |
Hi Tom, I have tried with the pin 5 and 6 on the expansion port, but nothing changed...