git-svn-id: https://svn.salfter.gotdns.org/svn/a2bfc/trunk@82 1b90f75b-8b96-4784-87c0-14078182fce6
29 lines
429 B
C
29 lines
429 B
C
#include <stdio.h>
|
|
#include <conio.h>
|
|
#include "ow.h"
|
|
#include "ow-temp.h"
|
|
|
|
int main (void)
|
|
{
|
|
unsigned char devid[8]={40,12,203,62,0,0,0,108};
|
|
|
|
// activate temperature sensor
|
|
if (ow_reset())
|
|
{
|
|
printf("Error: 1-Wire bus disconnected\n");
|
|
return -1;
|
|
}
|
|
|
|
do
|
|
{
|
|
do
|
|
{
|
|
printf("%i deg F\n", ow_temp_read(devid, OW_TEMP_FAHRENHEIT));
|
|
}
|
|
while (!kbhit());
|
|
}
|
|
while (cgetc()!=3);
|
|
|
|
return 0;
|
|
}
|