OpenMarine
Unable to Import "Adafruit_MCP3008 - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=2)
+--- Thread: Unable to Import "Adafruit_MCP3008 (/showthread.php?tid=3598)



Unable to Import "Adafruit_MCP3008 - KAKU - 2021-08-27

Hi, all, news here!
I am unable to import "Adafruit_MCP3008" I get an error message when I run my code (I have downloaded that module onto my Pi), and when I go to the GitHub site it says that the Adafruit _Python_MCP3008 library has been deprecated and the CircuitPython must be used.  Does anyone come about this case when using it?
Obviously, I'm a NOOB and I found some videos about this on Youtube. But I'm confused about how code works and mine does not.  
Thanks!


RE: Unable to Import "Adafruit_MCP3008 - baltika_no_9 - 2021-08-31

(2021-08-27, 10:02 AM)KAKU Wrote: Hi, all, news here!
I am unable to import "Adafruit_MCP3008" I get an error message when I run my code (I have downloaded that module onto my Pi), and when I go to the GitHub site it says that the Adafruit _Python_MCP3008 library has been deprecated and the CircuitPython must be used.  Does anyone come about this case when using it?
Obviously, I'm a NOOB and I found some videos about this on Youtube. But I'm confused about how code works and mine does not.  
Thanks!

There's a whole bunch of stuff here confirming what you say about the library being deprecated but it shows how to use the CircuitPython module instead. It has plenty of examples.

 https://learn.adafruit.com/mcp3008-spi-adc/python-circuitpython

You need the library Adafruit_CircuitPython_MCP3xxx. You can use this library with python or CircuitPython.