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

Pietro
Pietro
30
| 0 0 0
Asked on 4/13/19, 2:06 PM
0
vote
271 Views

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

Tom
Tom
5415
| 0 0 1
Answered on 4/14/19, 3:44 AM
0
vote

Hi Tom, I have tried with the pin 5 and 6 on the expansion port, but nothing changed...

Pietro
on 4/14/19, 7:32 AM

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

55 follower(s)

Stats

Asked: 4/13/19, 2:06 PM
Seen: 271 times
Last updated: 4/14/19, 3:44 AM