About Us Knowledge Base Community Forum Electronics Toolbox FAQ Shipping & Delivery

Community Forum

Share your projects and post your questions

Search
Register or Sign In
Forum

IOError: [Errno 110] while reading Input State

2781 Views - Created 11/07/2016

11/07/2016

Posted by:
e.k

Users Avatar

Hello,

im using the IO pi plus for detecting some digital signals (0v = low, 5V = High) on a Input from a E-Stop Switch. Programming language is Python 2.7.

See Picture at: http://www.bilder-upload.eu/show.php?file=dac8e6-1468232550.png

For reading and writing to the IO pi plus im using the Python files from ABElectronics. The Port wehre im reading the signal is configured as  "Input" and the pullup resistors are enabled.

Now the Problem:

Reading the Pin status is working properly when i toggle the E-stop Switch for some time. But when the Estop was pressed a few times my software crashes with the Error: IOError: [Errno 110] Connection timed out.

Click this link for a picture: http://www.bilder-upload.eu/show.php?file=79fff0-1468229074.png

If this error is occurred once i am my software i can't read or write to any device on the i2c bus and have to switch off the power supply of the Raspberry Pi. A normal software reboot of the Pi doesn't fix this error.

Do you know a solution for this Error?

11/07/2016

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

Hello

From looking at the error in your screenshot it appears to be crashing while trying to read from an ADC Pi.  Do you have an ADC Pi on the Raspberry Pi as well as the IO Pi?

The error could occur if you have two python scripts trying to access the I2C port at the same time as one script would block the port while it is in use causing the other script to time out on the connection.  Running two threads within a single python script could also cause the same problem.  The solution to this would be to use a single script for accessing both the IO Pi and ADC Pi or try to find some way of checking that one script has finished running before the other script.

AB Electronics UK Tech Support

Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.