Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Amber
- */
- #include <LiquidCrystal.h>
- LiquidCrystal lcd (11, 13, 8, 10, 12, 7);
- const int photoPin = A2;
- int photoVal = 0;
- void setup()
- {
- pinMode (photoPin, INPUT);
- Serial.begin (9600);
- lcd.begin (16,2);
- lcd.clear ();
- }
- void loop()
- {
- photoVal = analogRead (photoPin);
- lcd.print ("the value is:");
- lcd.setCursor (6, 1);
- lcd.print (photoVal);
- delay (100);
- lcd.clear ();
- // put your main code here, to run repeatedly
- //for (int counter=0; counter < 14; counter ++)
- //{
- // lcd.setCursor (counter, 0);
- // lcd.print ("Amber");
- // delay (200);
- // lcd.clear ();
- //}
- }
Add Comment
Please, Sign In to add comment