Go Down

Topic: Using a photoresistor to block menu with arduino! (Read 659 times) previous topic - next topic

Graynomad

Well let's make a small change

Code: [Select]
int light_level = analogRead(A0);

if (light_level < 500) {
    print_menu();
} else {
    lcd.print ("Make it darker");
}


______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

ekarlsson25

Thank you very much! It helped alot, and now it's working  :)

Go Up