Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. #include <LiquidCrystal_I2C.h>
  2.  
  3. // Construct an LCD object and pass it the
  4. // I2C address, width (in characters) and
  5. // height (in characters). Depending on the
  6. // Actual device, the IC2 address may change.
  7. LiquidCrystal_I2C lcd(0x27, 16, 2); // my lcd pin address is different from the example
  8.  
  9. void setup() {
  10.  
  11. // The begin call takes the width and height. This
  12. // Should match the number provided to the constructor.
  13.  
  14. Serial.begin(115200);
  15. Serial.println ("In Setup");
  16. lcd.begin(16,2);
  17. lcd.init();
  18.  
  19. // Turn on the backlight.
  20.  
  21. lcd.backlight();
  22.  
  23. // Move the cursor characters to the right and
  24. // zero characters down (line 1).
  25.  
  26. lcd.setCursor(5, 0);
  27.  
  28. // Print HELLO to the screen, starting at 5,0.
  29.  
  30. lcd.print("HELLO");
  31.  
  32. // Move the cursor to the next line and print
  33. // WORLD.
  34.  
  35. lcd.setCursor(5, 1);
  36. lcd.print("WORLD");
  37. }
  38.  
  39. void loop() {
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement