Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import time
import urllib
import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
DEBUG = 1
# read SPI data from MCP3008 chip, 8 possible adc's (0 thru 7)
@qqrs
qqrs / adafruit_mcp3008.py
Created November 18, 2012 04:56 — forked from ladyada/adafruit_mcp3008.py
Raspbery Pi Analog Input with MCP3008
#!/usr/bin/env python
import time
import datetime
import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
DEBUG = 1
# read SPI data from MCP3008 chip, 8 possible adc's (0 thru 7)