light sensor lcd display

yay, new project done and documented…

sorry i havent been active in a while, its been hectic with my mid-terms and all, but i’m back with a simple and cool thing:
A light sensor that reads 4 diffrent light modes, and displays them with words on the lcd!

heres they youtube link, and also please read the description, becuase with my crappy camera, it’s hard to read what it sais, and the description shows what it sais…

comment and say what you think!
thanks for lookin!

I would be interested in seeing the code for this.

no problem!

here it is:

int val = 0;
void setup()
{
 Serial.begin(9600);
  backlightOn();

}

void loop()
{
val = analogRead(0)/4.011764;
if (val > 252)  
 {
  selectLineOne();
  delay(50);
  Serial.print("It is very dark ");
  selectLineTwo();
  delay(50);
  Serial.print("in this room.");
  delay(100);
 }
if (val > 246 && val < 252)
 {
   selectLineOne();
   delay(50);
  Serial.print("It is pretty   ");
  selectLineTwo();
  delay(50);
  Serial.print("dark here.       ");
  delay(100);
 }
if (val > 235 && val < 246)
 {
   selectLineOne();
   delay(50);
  Serial.print("It is pretty     ");
  selectLineTwo();
  delay(50);
  Serial.print("bright here.      ");
  delay(100);
 }
if (val < 235)
{
  selectLineOne();
   delay(50);
  Serial.print("It is bright        ");
  selectLineTwo();
  delay(50);
  Serial.print("in this room.      ");
  delay(100);
}
}

void selectLineOne(){  //puts the cursor at line 0 char 0.
   Serial.print(0xFE, BYTE);   //command flag
   Serial.print(128, BYTE);    //position
}
void selectLineTwo(){  //puts the cursor at line 0 char 0.
   Serial.print(0xFE, BYTE);   //command flag
   Serial.print(192, BYTE);    //position
}
void clearLCD(){
   Serial.print(0xFE, BYTE);   //command flag
   Serial.print(0x01, BYTE);   //clear command.
}
void backlightOn(){  //turns on the backlight
    Serial.print(0x7C, BYTE);   //command flag for backlight stuff
    Serial.print(157, BYTE);    //light level.
}
void backlightOff(){  //turns off the backlight
    Serial.print(0x7C, BYTE);   //command flag for backlight stuff
    Serial.print(128, BYTE);     //light level for off.
}
void serCommand(){   //a general function to call the command flag for issuing all other commands   
  Serial.print(0xFE, BYTE);
}

Now adjust the backlight according to lighting conditions to save power. :)

hmmmm, good idea cheater, alot of backlight when there is no light, and no backlight when there is no light, but can i control how bright the backlight its, or is there only on and off?