Rev 2779 Rev 2780
Line 23... Line 23...
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
26   26  
27 if (REV[strlen(REV)-1]=='$') REV[strlen(REV)-1]=0; 27 if (REV[strlen(REV)-1]=='$') REV[strlen(REV)-1]=0;
28 printf("\r\n\r\n# Mrakomer %s (C) 2011 UST\r\n",VER); // Welcome message 28 printf("\r\n\r\n# AWS01A %s (C) 2013 www.mlab.cz \r\n",VER); // Welcome message
29 printf("#%s\r\n",&REV[4]); 29 printf("#%s\r\n",&REV[4]);
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");
Line 53... Line 53...
53 setup_oscillator(OSC_8MHZ); 53 setup_oscillator(OSC_8MHZ);
54 setup_spi(SPI_MASTER | SPI_MODE_0 | SPI_CLK_DIV_64); 54 setup_spi(SPI_MASTER | SPI_MODE_0 | SPI_CLK_DIV_64);
55 output_high(CSN_SPI); 55 output_high(CSN_SPI);
56 delay_ms(100); 56 delay_ms(100);
57   57  
58 printf("Simple Thermomether\r\n",); -  
59 printf("(c) Kaklik 2013\r\n"); -  
60 printf("www.mlab.cz\r\n"); -  
61   -  
62 welcome(); 58 welcome();
63   59  
64 sht_init(); 60 sht_init();
65 MPL_init(); // get correction coefficients from the sensor 61 MPL_init(); // get correction coefficients from the sensor
66   62