ADC Reading Tutorial
The Expander Pi is an Analogue, Digital and RTC development Interface for the Raspberry Pi
07/08/2020
Posted by:
GrahamT
Greetings.
I recently purchased the Expander Pi, as a novice I rely heavily on the tutorial on the website. I successfully worked my way through the tutorial on reading and writing to the IO pins but struggling with the “demo_adcread.py” when I first run the program I had a problem with the Libraries not being installed correctly, so I poked and prodded a bit… I now get the following when I run the program:
Python 3.7.3 (/usr/bin/python3)
>>> %cd /home/pi
>>> %Run demo-adcread2.py
Traceback (most recent call last):
File "/home/pi/demo-adcread2.py", line 16, in <module>
adc = ADC() # create an instance of the ADC
File "/usr/local/lib/python3.7/dist-packages/ExpanderPi/ExpanderPi.py", line 122, in __init__
self.__spiADC.open(0, 0)
FileNotFoundError: [Errno 2] No such file or directory
>>>
Thank you in advance
I recently purchased the Expander Pi, as a novice I rely heavily on the tutorial on the website. I successfully worked my way through the tutorial on reading and writing to the IO pins but struggling with the “demo_adcread.py” when I first run the program I had a problem with the Libraries not being installed correctly, so I poked and prodded a bit… I now get the following when I run the program:
Python 3.7.3 (/usr/bin/python3)
>>> %cd /home/pi
>>> %Run demo-adcread2.py
Traceback (most recent call last):
File "/home/pi/demo-adcread2.py", line 16, in <module>
adc = ADC() # create an instance of the ADC
File "/usr/local/lib/python3.7/dist-packages/ExpanderPi/ExpanderPi.py", line 122, in __init__
self.__spiADC.open(0, 0)
FileNotFoundError: [Errno 2] No such file or directory
>>>
Thank you in advance
07/08/2020
Posted by:
andrew
Hello Graham
Have you enabled the SPI bus on your Raspberry Pi? Try going through the steps in our SPI tutorial and see if that fixes the problem.
Have you enabled the SPI bus on your Raspberry Pi? Try going through the steps in our SPI tutorial and see if that fixes the problem.
07/08/2020
Posted by:
GrahamT
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.