Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

sensor.C

Go to the documentation of this file.
00001 //
00002 // The contents of this file are subject to the Mozilla Public License
00003 // Version 1.0 (the "License"); you may not use this file except in
00004 // compliance with the License. You may obtain a copy of the License
00005 // at http://www.mozilla.org/MPL/
00006 // 
00007 // Software distributed under the License is distributed on an "AS IS"
00008 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00009 // the License for the specific language governing rights and
00010 // limitations under the License.
00011 //
00012 // This software was developed as part of the legOS project.
00013 //
00014 // Contributor: Pat Welch (legOS@mousebrains.com)
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 // This program reads the sensor and displays the hex value on
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

Generated on Fri Feb 25 08:02:35 2005 for brickos by  doxygen 1.3.9.1