This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
#!ipython --pylab | |
from pylab import * | |
def format_resistor_value(value): | |
value = int(value) * 1000 | |
for unit in (u"Ω", u"kΩ", u"MΩ", u"GΩ"): | |
value = value / 1000 | |
if value < 1000: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |