# -*- coding: utf-8 -*- # port of the Adafruit MCP3008 interface code found @ http://learn.adafruit.com/send-raspberry-pi-data-to-cosm/python-script # # adjast timing and resolution for MCP3208 (12bit) # require 'pi_piper' def read_adc(adc_pin, clockpin, adc_in, adc_out, cspin) cspin.on clockpin.off adc_in.off # clockpin が low の状態で cspin を立ち下げると SPI モード 0,0 cspin.off command_out = adc_pin command_
