| Line 1... |
Line 1... |
| 1 |
/**** IR Mrakomer3 ****/ |
1 |
/**** IR Mrakomer3 ****/ |
| 2 |
#define VERSION "3.1" |
2 |
#define VERSION "3.1" |
| 3 |
#define ID "$Id: irmrak3.c 1138 2008-05-19 14:50:14Z kakl $" |
3 |
#define ID "$Id: irmrak3.c 1215 2008-08-08 12:25:25Z kakl $" |
| 4 |
#include "irmrak3.h" |
4 |
#include "irmrak3.h" |
| 5 |
|
5 |
|
| 6 |
#define SA 0x00 // Slave Address (0 for single slave / 0x5A<<1 default) |
6 |
#define SA 0x00 // Slave Address (0 for single slave / 0x5A<<1 default) |
| 7 |
#define RAM_Access 0x00 // RAM access command |
7 |
#define RAM_Access 0x00 // RAM access command |
| 8 |
#define RAM_Tobj1 0x07 // To1 address in the eeprom |
8 |
#define RAM_Tobj1 0x07 // To1 address in the eeprom |
| Line 165... |
Line 165... |
| 165 |
enable_interrupts(INT_RDA); |
165 |
enable_interrupts(INT_RDA); |
| 166 |
|
166 |
|
| 167 |
while(TRUE) |
167 |
while(TRUE) |
| 168 |
{ |
168 |
{ |
| 169 |
|
169 |
|
| 170 |
if (flag) |
170 |
// if (flag) |
| 171 |
{ |
171 |
{ |
| 172 |
n++; // Increment the number of measurement |
172 |
n++; // Increment the number of measurement |
| 173 |
|
173 |
|
| 174 |
tempa=ReadTemp(SA, RAM_Tamb); // Read temperatures from sensor |
174 |
tempa=ReadTemp(SA, RAM_Tamb); // Read temperatures from sensor |
| 175 |
temp=ReadTemp(SA, RAM_Tobj1); |
175 |
temp=ReadTemp(SA, RAM_Tobj1); |