Advertisement
Ollivier

Test Ecran 4 lignes 20 caracteres

Aug 13th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. #include <Wire.h>
  2. #include <LiquidCrystal_I2C.h>
  3.  
  4. //----- Adressage matériel -----
  5. // En cas de non fonctionnement, mettez la ligne 8 en
  6. // commentaire et retirez le commentaire à la ligne 9.
  7.  
  8. //LiquidCrystal_I2C lcd(0x27, 20, 4);
  9. //LiquidCrystal_I2C lcd(0x3F,20,4);
  10.  
  11. // Resultat I2C Scanner :
  12. //Scanning...
  13. //I2C device found at address 0x50  !
  14. //I2C device found at address 0x68  !
  15. //done
  16. // donc :
  17.  
  18. LiquidCrystal_I2C lcd(0x50, 20, 4);
  19. // ou
  20. //LiquidCrystal_I2C lcd(0x68, 20, 4);
  21.  
  22. void setup()
  23. {
  24.  lcd.init(); // initialisation de l'afficheur
  25. }
  26. void loop()
  27. {
  28.  lcd.backlight();
  29.  // Envoi du message
  30.  lcd.setCursor(0, 0);
  31.  lcd.print("Test Ecran");
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement