ambersy314

Untitled

Jun 29th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. /*
  2. * Amber
  3. */
  4. #include <LiquidCrystal.h>
  5. LiquidCrystal lcd (11, 13, 8, 10, 12, 7);
  6. const int photoPin = A2;
  7. int photoVal = 0;
  8.  
  9.  
  10. void setup()
  11. {
  12. pinMode (photoPin, INPUT);
  13. Serial.begin (9600);
  14. lcd.begin (16,2);
  15. lcd.clear ();
  16. }
  17.  
  18. void loop()
  19. {
  20. photoVal = analogRead (photoPin);
  21. lcd.print ("the value is:");
  22. lcd.setCursor (6, 1);
  23. lcd.print (photoVal);
  24. delay (100);
  25. lcd.clear ();
  26. // put your main code here, to run repeatedly
  27. //for (int counter=0; counter < 14; counter ++)
  28. //{
  29. // lcd.setCursor (counter, 0);
  30. // lcd.print ("Amber");
  31. // delay (200);
  32. // lcd.clear ();
  33. //}
  34. }
Add Comment
Please, Sign In to add comment