/Designs/Measuring_instruments/AWS01B/SW/PIC16F887/main.c
114,7 → 114,7
 
while(TRUE)
{
int i=0;
unsigned int32 i=0;
 
mpl3115_setP(); //nastaveni pro tlak a teplotu
delay_ms (500);
125,15 → 125,25
delay_ms (500);
altimet_a = mpl3115_A();
if (i<10000) sht_config = SHT25_RH12_T14 | SHT25_HEATER_OFF; // loop alters on chip heater on and off to check correct function
else
{
sht_config = SHT25_RH12_T14 | SHT25_HEATER_ON;
if (i > 10050) i = 0;
}
 
sht25_t = SHT25_get_temp(); //mereni hodnot z SHT25
sht25_h = SHT25_get_hum();
SHT25_setup(sht_config);
smer_v = wind_direction(); //vrati azimut aktualniho smeru vetru
anemo = wind_speed();
 
printf(" %6.2f %7.2f %9.2f %6.2f %6.2f %5.2f %6.2f \n\r", altimet_t, altimet_a, altimet_p, sht25_t, sht25_h, smer_v, anemo);
printf(" %6.2f %7.2f %9.2f %6.2f %6.2f %X %5.2f %6.2f \n\r", altimet_t, altimet_a, altimet_p, sht25_t, sht25_h, sht_config, smer_v, anemo);
delay_ms(1000);
i++;
}
}