|
|
@ -33,8 +33,12 @@ int str2int(unsigned char *ptr);
|
|
|
|
int DAQ(int t_hrs, int tm_s);
|
|
|
|
int DAQ(int t_hrs, int tm_s);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int main(){
|
|
|
|
int main(int argc, int argT, int argt){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(argc!=3){
|
|
|
|
|
|
|
|
printf("Invalid number of arguments,\n usage: daq <time(h)> <sampling period(s)>\nexiting!\n");
|
|
|
|
|
|
|
|
return -2;
|
|
|
|
|
|
|
|
}
|
|
|
|
//configuración de sensores
|
|
|
|
//configuración de sensores
|
|
|
|
printf("Configuring CO2 sensor\n");
|
|
|
|
printf("Configuring CO2 sensor\n");
|
|
|
|
sensConf(GC0017, B9600, Pulling_Mode, " K 00002\r\n");
|
|
|
|
sensConf(GC0017, B9600, Pulling_Mode, " K 00002\r\n");
|
|
|
@ -46,7 +50,7 @@ int main(){
|
|
|
|
|
|
|
|
|
|
|
|
//adquisición
|
|
|
|
//adquisición
|
|
|
|
printf("Starting data acquisition\n");
|
|
|
|
printf("Starting data acquisition\n");
|
|
|
|
DAQ(1, 3);
|
|
|
|
DAQ(argT, argt);
|
|
|
|
sleep(1);
|
|
|
|
sleep(1);
|
|
|
|
|
|
|
|
|
|
|
|
//finalización
|
|
|
|
//finalización
|
|
|
|