Exemple #1
0
import time
import threading
import logging 
import serial 
import io
import sim900
import sys

#this is a bad file for recording the diode temps and voltages
#eventually it will be merged with recording the resistance bridges
#and actually use the sim900 file functions

#create an instance of the sim900 commands
sim = sim900.sim900()


#main function to records temps
try: 
    timestr = time.strftime("%Y%m%d-%H%M%S")
    filename = "/home/heather/SRS/%s.txt" % timestr
    f = open(filename, 'w+')
    f.write("time, diode ch1 temp, dio ch 2 temp, dio 3 temp, dio 4 temp, dio 1 volts, dio 2 volts, dio 3 volts, dio 4 volts, rox 1 temp, rox 1 res, rox 2 temp, rox 2 res, rox 3 res, rox 3 temp\n")

    while 1:

        #get diode info
        sim.connect_sim922()     
        dio_temps = sim.get_sim922_temp()
        dio_temps = dio_temps.rstrip()
        time.sleep(1)
        dio_volts = sim.get_sim922_volts()
import time
import threading
import logging 
import serial 
import io
import sim900
import sys

if __name__ == "__main__":

    #this is a bad file for recording the diode temps and voltages
    #eventually it will be merged with recording the resistance bridges
    #and actually use the sim900 file functions

    #create an instance of the sim900 commands
    sim = sim900.sim900(port='/dev/ttyUSB2')


    #main function to records temps
    try:
        timestr = time.strftime("%Y%m%d-%H%M%S")
        filename = "/home/data/SRS/%s.txt" % timestr
        f = open(filename, 'w+')
        f.write("time, diode ch1 temp, dio ch 2 temp, dio 3 temp, dio 4 temp, dio 1 volts, dio 2 volts, dio 3 volts, dio 4 volts, rox 1 temp, rox 1 res, rox 2 temp, rox 2 res, rox 3 res, rox 3 temp\n")

        while 1:

            #get diode info
            sim.connect_sim922()
            dio_temps = sim.get_sim922_temp()
            dio_temps = dio_temps.rstrip()
import time
import threading
import logging
import serial
import io
import sim900
import sys

if __name__ == "__main__":
    #this is a bad file for recording the diode temps and voltages
    #eventually it will be merged with recording the resistance bridges
    #and actually use the sim900 file functions

    #create an instance of the sim900 commands
    sim = sim900.sim900()

    #main function to records temps
    try:
        timestr = time.strftime("%Y%m%d-%H%M%S")
        filename = "/home/heather/SRS/%s.txt" % timestr
        f = open(filename, 'w+')
        # The column headers for rox 3 were the opposite of the written data until 2014-10-10:
        f.write(
            "time, diode ch1 temp, dio ch 2 temp, dio 3 temp, dio 4 temp, dio 1 volts, dio 2 volts, dio 3 volts, dio 4 volts, rox 1 temp, rox 1 res, rox 2 temp, rox 2 res, rox 3 temp, rox 3 res\n"
        )

        while 1:

            #get diode info
            sim.connect_sim922()
            dio_temps = sim.get_sim922_temp()