adafruit / Adafruit_Python_MCP3008

Python code to use the MCP3008 analog to digital converter with a Raspberry Pi or BeagleBone black.
MIT License
81 stars 68 forks source link

ASUS Tinker #7

Closed jalowin closed 5 years ago

jalowin commented 6 years ago

I am installed the library in an ASUS Tinker and I obtain this eror

mcp = Adafruit_MCP3008.MCP3008(clk=CLK, cs=CS, miso=MISO, mosi=MOSI)

File "build/bdist.linux-armv7l/egg/Adafruit_MCP3008/MCP3008.py", line 42, in init File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/SPI.py", line 159, in init File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/GPIO.py", line 278, in setup TypeError: argument 1 must be string, not int

I have declared the system

!/usr/bin/env python

Simple example of reading the MCP3008 analog input channels and printing

them all out.

Author: Tony DiCola

License: Public Domain

import time import datetime import subprocess, signal import ASUS.GPIO as GPIO

import Adafruit_DHT

Import SPI library (for hardware SPI) and MCP3008 library.

import Adafruit_GPIO.SPI as SPI import Adafruit_MCP3008 import dht11

import mcp3008

sensor = dht11.DHT11(pin=4)

mcp = mcp3008.MCP3008()

GPIO.setmode(GPIO.ASUS) GPIO.setwarnings(False)

Software SPI configuration:

CLK = 168 MISO = 238 MOSI = 185 CS = 224 mcp = Adafruit_MCP3008.MCP3008(clk=CLK, cs=CS, miso=MISO, mosi=MOSI)

Thanks for all Thank you for opening an issue on an Adafruit Python library repository. To improve the speed of resolution please review the following guidelines and common troubleshooting steps below before creating the issue:

If you're sure this issue is a defect in the code and checked the steps above please fill in the following fields to provide enough troubleshooting information. You may delete the guideline and text above to just leave the following details:

ladyada commented 6 years ago

hiya not surprising, but we wont be supporting ASUS tinker via this library - if you're interested in adding ASUS to circuitpython that is our path forward and includes MCP3xxx and a hundred other sensors as well!

kattni commented 5 years ago

This library is no longer supported. We have written a library called Adafruit Blinka that allows for using CircuitPython libraries on SBCs with GPIO. Please see the Adafruit CircuitPython MCP3xxx library for using the MCP3008.