/* light.c */

#include <unistd.h>
#include <conio.h>
#include <dsensor.h>

#define EYE_SENSOR SENSOR_2
#define EYE LIGHT_2

int main (int argc, char **argv)
{

  /* Turn on the sensor */
  ds_active (&EYE_SENSOR);

  msleep(100);

  while(1)
    {
      /* test to see if it is dark out */
      lcd_int(EYE);
      msleep(50);
    }

  /* go back to the OS */
  cls();
  return 0;
}
