mosipin  = SPIMOSI,
                        cspin    = SPICS,
                        pinmode  = PINMODE
                       )
 #configure thermistor
 therm = Thermistor(A=A,
                    B=B,
                    C=C,
                    R_25C=R_25C,
                    R_std=R_STD,
                    adc=adc,
                    adc_channel = ADC_CHANNEL
                    )
 #setup the DHT library
 DHT_PIN = 4
 DHT.setup(pinmode='BCM')
 dht = DHT.DHT22(DHT_PIN)
                    
                    
 #setup thingspeak channel
 api_write_key = open('.API_WRITE_KEY.secret').read().strip()
 thingspeak_channel = ThingspeakChannel(api_write_key)
 
 #read thermistor in a loop
 try:
     while True:
         try:
             H_room, T_room = dht.read() #WARNING, this may occasionally throw an IOError
             T_soil = therm.read_temperature()
             print "---"
             print "timestamp: %s" % time.time()