o: ActiveSupport::Cache::Entry :@compressedF:@value"["U
| main.c | ||
|---|---|---|
| 11 | 11 |
|
| 12 | 12 |
#include "../SHT25.h" |
| 13 | 13 |
#include "../LTS01.h" |
| 14 |
#include "./HMC5883L.h" |
|
| 15 |
#include <math.h> |
|
| 14 | 16 |
|
| 17 |
|
|
| 15 | 18 |
void main() |
| 16 | 19 |
{
|
| 17 | 20 |
float temp1, temp2, humidity; |
| ... | ... | |
| 28 | 31 |
setup_oscillator(OSC_8MHZ); |
| 29 | 32 |
|
| 30 | 33 |
|
| 31 |
printf("GeoMet01A\r\n",);
|
|
| 34 |
printf("GeoMet01A\r\n");
|
|
| 32 | 35 |
printf("(c) Kaklik 2013\r\n");
|
| 33 | 36 |
printf("www.mlab.cz\r\n");
|
| 37 |
|
|
| 38 |
// Init the HMC5883L. Set Mode register for |
|
| 39 |
// continuous measurements. |
|
| 40 |
hmc5883l_write_reg(HMC5883L_CFG_A_REG, 0x18); // no average, maximal update range |
|
| 41 |
hmc5883l_write_reg(HMC5883L_CFG_B_REG, 0x00); // minimal range |
|
| 42 |
hmc5883l_write_reg(HMC5883L_MODE_REG, 0x00); |
|
| 34 | 43 |
|
| 35 | 44 |
lcd_init(); |
| 36 | 45 |
lcd_putc("(c) Kaklik 2013");
|
| ... | ... | |
| 45 | 54 |
temp1 = SHT25_get_temp(); |
| 46 | 55 |
humidity = SHT25_get_hum(); |
| 47 | 56 |
temp2= LTS01_get_temp(); |
| 48 |
|
|
| 49 |
printf(lcd_putc,"%f C %f \%% \r\n",temp1, humidity); |
|
| 57 |
hmc5883l_read_data(); |
|
| 58 |
|
|
| 59 |
printf(lcd_putc,"%f C %f \%%",temp1, humidity); |
|
| 50 | 60 |
lcd_gotoxy(1,2); |
| 51 | 61 |
printf(lcd_putc," %f C",temp2); |
| 52 |
printf("%ld %f %f %f \r\n",i, temp1, humidity, temp2);
|
|
| 62 |
printf("%ld %f %f %f ",i, temp1, humidity, temp2);
|
|
| 63 |
printf("%Ld %Ld %Ld \n\r", compass.x, compass.y, compass.z);
|
|
| 53 | 64 |
i++; |
| 54 | 65 |
Delay_ms(100); |
| 55 | 66 |
} |