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++/Sensor.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 Sensor s(Sensor::S2, true);
00032
00033 while (!shutdown_requested()) {
00034 cputw(s.get());
00035 delay(10);
00036 }
00037 return 0;
00038 }
00039
00040 #else // CONF_DSENSOR
00041 #warning activeSensor.C requires CONF_DSENSOR
00042 #warning activeSensor demo will do nothing
00043 int
00044 main(int argc,
00045 char **argv)
00046 {
00047 return 0;
00048 }
00049 #endif // CONF_DSENSOR