Advertisement
rinaldohack

rinaldo.id hello world arduino led i2c

Jun 20th, 2017
2,508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #include <LiquidCrystal_I2C.h>
  2.  
  3. //replace 0x3F with address you found at I2C scanner.
  4. LiquidCrystal_I2C lcd(0x3F, 16, 2);
  5.  
  6. void setup() {
  7.  
  8. //16 is the width. 2 is the height.
  9. lcd.begin(16,2);
  10. lcd.init();
  11.  
  12. // Turn on the backlight.
  13. lcd.backlight();
  14.  
  15. // Move the cursor characters to the right and
  16. // zero characters down (line 1).
  17. lcd.setCursor(0, 0);
  18.  
  19. // Print HELLO WORLD! to the screen, starting at 0,0.
  20. lcd.print("HELLO WORLD!");
  21.  
  22. // Move the cursor to the next line and print
  23. // www.rinaldo.id.
  24. lcd.setCursor(0, 1);
  25. lcd.print("www.rinaldo.id");
  26. }
  27.  
  28. void loop() {
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement