/Modules/Sensors/ALTIMET01A/SW/Python/data_logger.py
5,6 → 5,7
import time
import datetime
import sys
import serial
 
from pymlab import config
 
71,6 → 72,12
 
#### Data Logging ###################################################
 
ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1)
print ser.name
ser.write("hello")
#http://pyserial.sourceforge.net/shortintro.html
line = ser.readline() # read a '\n' terminated line
ser.close()
 
try:
with open("temperature.log", "a") as f:
/Modules/Sensors/SHT25V01A/SW/PIC16F887/SHT25.c
61,7 → 61,7
LSB = LSB >> 2; // trow out status bits
 
data = (((unsigned int16) MSB << 8) + (LSB << 4));
data = (((unsigned int16) MSB << 8) + (LSB << 2));
return(-46.85 + 175.72*((float)data/0xFFFF));
}
 
85,7 → 85,7
 
LSB = LSB >> 2; // trow out status bits
 
data = (((unsigned int16) MSB << 8) + (LSB << 4) );
data = (((unsigned int16) MSB << 8) + (LSB << 2) );
return( -6.0 + 125.0*((float)data/0xFFFF));
}