Conversion Timeout Error
The ADC Pi is an Analogue to Digital converter for the Raspberry Pi
26/06/2018
Posted by:
Jochem
I've used your ADCPi boards (ADC PI Plus) for a few projects (raspberry pi 2 & 3) and and I like them. However, in two of my recent uses I've been getting the error:
'TimeoutError: read_raw: channel xx conversion timed out' (where xx is any of the channels)
The error can be thrown after running for a few seconds or after a few hours. It also happens when I run your 'demo_readvoltage.py' code.
Any suggestions?
Rgds,
Jochem
26/06/2018
Posted by:
andrew
I have updated the ADC Pi library to increase the timeout period. Hopefully, this should stop your code from timing out when reading from the ADC. Please can you try downloading the new version from GitHub and see if this fixes the problem?
ADC Pi Python Library
04/07/2018
Posted by:
Jochem
I'd fiddled with this in your library and it does work. Thanks for updating the library. Out of interest - how have you arrived at the 4/15, 1/15. 1/60, 1/240 times for bit rates of 18, 16, 14, 12?
Kind regards,
Jochem
05/07/2018
Posted by:
andrew
I expect what was happening is a process on the Raspberry Pi was holding up the CPU for slightly longer than the ADC library was allowing for a timeout period which caused it to throw an exception. By increasing the timeout period from 5x the single sample time to 10x it is allowing enough time for Linux to carry out any processes that are being run alongside the python script.
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.