00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include <config.h>
00017 #if defined(CONF_DSENSOR)
00018
00019 #include <c++/TemperatureSensor.H>
00020 #include <conio.h>
00021 #include <unistd.h>
00022 #include <tm.h>
00023
00024
00026
00027 int
00028 main(int argc,
00029 char **argv)
00030 {
00031 TemperatureSensor t(Sensor::S2);
00032
00033 while (!shutdown_requested()) {
00034 const int a(t.tenths());
00035 cputw(a);
00036 delay(100);
00037 }
00038 return 0;
00039 }
00040 #else // CONF_DSENSOR
00041 #warning temperatureSensor.C requires CONF_DSENSOR
00042 #warning temperatureSensor demo will do nothing
00043 int
00044 main(int argc,
00045 char **argv)
00046 {
00047 return 0;
00048 }
00049 #endif // CONF_DSENSOR