Line 8... |
Line 8... |
8 |
|
8 |
|
9 |
#define SEND_DELAY 50 // Time between two characters on RS232 |
9 |
#define SEND_DELAY 50 // Time between two characters on RS232 |
10 |
|
10 |
|
11 |
char VER[4]=VERSION; // Buffer for concatenate of a version string |
11 |
char VER[4]=VERSION; // Buffer for concatenate of a version string |
12 |
|
12 |
|
13 |
#define ONE_WIRE_PIN PIN_C7 |
13 |
#define ONE_WIRE_PIN PIN_C7 // DS18B20 sensor connection |
14 |
#include "..\ds1820.c" |
14 |
#include "..\ds1820.c" |
15 |
|
15 |
|
16 |
#define sht_data_pin PIN_D0 |
16 |
#define sht_data_pin PIN_D0 // SHT11 sensor connection |
17 |
#define sht_clk_pin PIN_D1 |
17 |
#define sht_clk_pin PIN_D1 |
18 |
#include "..\SHT.c" |
18 |
#include "..\SHT.c" |
19 |
|
19 |
|
20 |
#define CSN_SPI PIN_C2 |
20 |
#define CSN_SPI PIN_C2 // preassure sensor connection |
21 |
#include "..\MPL115A1.c" |
21 |
#include "..\MPL115A1.c" |
22 |
|
22 |
|
23 |
void welcome(void) // Welcome message |
23 |
void welcome(void) // Welcome message |
24 |
{ |
24 |
{ |
25 |
char REV[50]=ID; // Buffer for concatenate of a version string |
25 |
char REV[50]=ID; // Buffer for concatenate of a version string |
Line 30... |
Line 30... |
30 |
// printf("#\r\n"); |
30 |
// printf("#\r\n"); |
31 |
// printf("# commands: h, c, o, l, x, i, r, a, s, u\r\n"); |
31 |
// printf("# commands: h, c, o, l, x, i, r, a, s, u\r\n"); |
32 |
// printf("# h_eat, c_old, o_pen, l_ock, x_open, "); |
32 |
// printf("# h_eat, c_old, o_pen, l_ock, x_open, "); |
33 |
// printf("i_nfo, r_epeat, a_uto, s_single, u_pdate\r\n"); |
33 |
// printf("i_nfo, r_epeat, a_uto, s_single, u_pdate\r\n"); |
34 |
// printf("#\r\n"); |
34 |
// printf("#\r\n"); |
35 |
// printf("# ver seq in[1/100 C] sky[1/100 C] sky[1/100 C] "); |
35 |
printf("# ver seq temp[K] hum_temp[K] hum[%%] "); |
36 |
// printf("out[1/100 C] heat[s] dome[s] check\r\n\r\n"); |
36 |
printf("bar_temp[K] pressure[hPa] check\r\n\r\n"); |
37 |
|
37 |
|
38 |
//---WDT |
38 |
//---WDT |
39 |
restart_wdt(); |
39 |
restart_wdt(); |
40 |
} |
40 |
} |
41 |
|
41 |
|