Closed jalowin closed 5 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!
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.
I am installed the library in an ASUS Tinker and I obtain this eror
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:
Do not use GitHub issues for troubleshooting projects and issues. Instead use the forums at http://forums.adafruit.com to ask questions and troubleshoot why something isn't working as expected. In many cases the problem is a common issue that you will more quickly receive help from the forum community. GitHub issues are meant for known defects in the code. If you don't know if there is a defect in the code then start with troubleshooting on the forum first.
If following a tutorial or guide be sure you didn't miss a step. Carefully check all of the steps and commands to run have been followed. Consult the forum if you're unsure or have questions about steps in a guide/tutorial.
For Python/Raspberry Pi projects check these very common issues to ensure they don't apply:
If you are receiving an ImportError: No module named... error then a library the code depends on is not installed. Check the tutorial/guide or README to ensure you have installed the necessary libraries. Usually the missing library can be installed with the
pip
tool, but check the tutorial/guide for the exact command.Be sure you are supplying adequate power to the board. Check the specs of your board and power in an external power supply. In many cases just plugging a board into your computer is not enough to power it and other peripherals.
Double check all soldering joints and connections. Flakey connections cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.
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:
Platform/operating system (i.e. Raspberry Pi with Raspbian operating system, Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): INSERT PLATFORM/OPERATING SYSTEM HERE
Python version (run
python -version
orpython3 -version
): INSERT PYTHON VERSION HEREError message you are receiving, including any Python exception traces: **INSERT ERROR MESAGE/EXCEPTION TRACES HERE***
List the steps to reproduce the problem below (if possible attach code or commands to run): LIST REPRO STEPS BELOW