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