Advertisement
brisbons19

LCD my name is Sophia

Jun 26th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. /* LCD
  2. * Sophia Brisbon
  3. */
  4.  
  5. #include <LiquidCrystal.h>
  6. LiquidCrystal lcd(12,11,7,8, 13, 10);
  7. const int photoPin = 15;
  8. int photoVal;
  9.  
  10. void setup()
  11. {
  12. pinMode(photoPin, INPUT);
  13. Serial.begin(9600);
  14. lcd.begin(16,2);
  15. lcd.print("My name is");
  16. lcd.setCursor(counter, 1);
  17. lcd.print("Sophia");
  18. delay(300);
  19. lcd.clear();
  20. }
  21.  
  22. void loop()
  23. {
  24.  
  25. for(int counter = 0; counter < 11; counter++)
  26. {
  27. photoVal=analogRead(photoPin);
  28. lcd.print("The value is:");
  29. lcd.setCursor(6,1);
  30. lcd.print(photoVal);
  31. delay(100);
  32. lcd.clear();
  33. lcd.setCursor(counter, 0);
  34. lcd.print("Sophia");
  35. delay(300);
  36. lcd.clear();
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement