# along with this program. If not, see <http://www.gnu.org/licenses/>. # make shure Python knows where to look for the RUEDI Python code # http://stackoverflow.com/questions/4580101/python-add-pythonpath-during-command-line-module-run # Example (bash): export PYTHONPATH=~/ruedi/python import time # import ruediPy classes: from classes.temperaturesensor_MAXIM import temperaturesensor_MAXIM from classes.datafile import datafile TSENS = temperaturesensor_MAXIM( serialport='/dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTA5GRX5-if00-port0', label='TEMP-TEST') # TSENS = temperaturesensor_MAXIM ( serialport = '/dev/serial/by-id/usb-FTDI_TTL232R-3V3_FT9S6X3O-if00-port0' , label = 'TEMP-TEST' , fig_w = 8 , fig_h = 3) # TSENS = temperaturesensor_MAXIM ( serialport = '/dev/cu.usbserial' , label = 'TEMP-TEST' , fig_w = 8 , fig_h = 3) DATAFILE = datafile('~/data') # start data file: DATAFILE.next() # start a new data file print('Data output to ' + DATAFILE.name()) # take temperature readings: while 1: T, unit = TSENS.temperature(DATAFILE) print(str(T) + ' ' + unit) TSENS.plot_tempbuffer()
# along with this program. If not, see <http://www.gnu.org/licenses/>. # make shure Python knows where to look for the RUEDI Python code # http://stackoverflow.com/questions/4580101/python-add-pythonpath-during-command-line-module-run # Example (bash): export PYTHONPATH=~/ruediPy/python import time # import ruediPy classes: from classes.temperaturesensor_MAXIM import temperaturesensor_MAXIM from classes.datafile import datafile TSENS = temperaturesensor_MAXIM ( serialport = '/dev/serial/by-id/usb-FTDI_TTL232R-3V3_FT9S9VXT-if00-port0' , label = 'TEMP-TEST' ) # TSENS = temperaturesensor_MAXIM ( serialport = '/dev/serial/by-id/usb-FTDI_TTL232R-3V3_FT9S6X3O-if00-port0' , label = 'TEMP-TEST' , fig_w = 8 , fig_h = 3) # TSENS = temperaturesensor_MAXIM ( serialport = '/dev/cu.usbserial' , label = 'TEMP-TEST' , fig_w = 8 , fig_h = 3) DATAFILE = datafile ( '~/data' ) # start data file: DATAFILE.next() # start a new data file print( 'Data output to ' + DATAFILE.name() ) # take temperature readings: while 1: T,unit = TSENS.temperature(DATAFILE) print ( str(T) + ' ' + unit ) TSENS.plot_tempbuffer()