Advertisement
Guest User

Untitled

a guest
Sep 26th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <LiquidCrystal.h>
  2. const int rs = 7, en = 6, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
  3. LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
  4.  
  5. int LDRpin = A0, LDRvalue;
  6. void setup() {
  7. lcd.begin(16, 2);
  8. pinMode(LDRpin, INPUT);
  9. }
  10.  
  11. void loop() {
  12. lcd.setCursor(0, 0);
  13. lcd.print(analogRead(A0));
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement