35,8 → 35,8 |
void EXT_isr() //interrup from rain sensor clip. |
{ |
rain++; |
if (input(PIN_B0)) ext_int_edge( H_TO_L ); |
if (!input(PIN_B0)) ext_int_edge( L_TO_H ); |
// if (input(PIN_B0)) ext_int_edge( H_TO_L ); osetreni pro pripad, ze by bylo treba cist obe hrany impulzu |
// if (!input(PIN_B0)) ext_int_edge( L_TO_H ); |
} |
|
float wind_direction(void) //vypocet azimutu smeru vetru |
43,7 → 43,8 |
{ |
signed int16 X,Y,Z; |
float b; |
X = mag_readX(); |
X = mag_readX(); |
delay_ms(10); |
Y = mag_readY(); |
|
|
84,11 → 85,6 |
|
unsigned int8 sht_config; |
|
//nastaveni SHT25 |
SHT25_soft_reset(); |
sht_config = SHT25_RH12_T14 | SHT25_HEATER_OFF; //vypnuti topeni v SHT25 |
SHT25_setup(sht_config); |
|
//nastavení pøeruení pro anemometr |
enable_interrupts(INT_TIMER1); |
enable_interrupts(INT_TIMER0); |
100,10 → 96,15 |
timer0_overflow_count=0; |
rain=0; |
|
|
welcome(); |
set_mag(); //nastaveni magnetometru pro smer vetru |
|
//nastaveni SHT25 |
SHT25_soft_reset(); |
sht_config = SHT25_RH12_T14 | SHT25_HEATER_OFF; //vypnuti topeni v SHT25 |
SHT25_setup(sht_config); |
|
|
while(TRUE) |
{ |
unsigned int32 i=0; |