LiquidCrystal_I2C_Frank_de_Brabander.ino 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. I am using the LiquidCrystal_I2C.h lib which points to
  3. https://github.com/johnrickman/LiquidCrystal_I2C/tree/master
  4. and it is authored by (in version IDE 2.3.2):
  5. Frank de Brabander
  6. when searvching fot LiquidCrystal_I2C in the Library Manager*/
  7. /* Note:
  8. i2c, unlike the Serial Port Protocol allowd for
  9. multiple clock speeds to be used so, we have an extra wire
  10. to set the clock. Thus we need two GPIOs:
  11. one for data (SDA) and another for the clock (SCL)
  12. in Arduino UNO the GPIOs are
  13. A4 for SDA
  14. A5 for SCL
  15. so we need to connect these to the i2c controller
  16. behind the LCD display
  17. */
  18. #include <LiquidCrystal_I2C.h>
  19. // initialize the library
  20. LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
  21. void setup()
  22. {
  23. lcd.init(); // initialize the lcd
  24. // Print a message to the LCD.
  25. lcd.backlight();
  26. lcd.setCursor(0,0);
  27. lcd.print("Hola, welcome to");
  28. lcd.setCursor(3,1);
  29. lcd.print("X-Institute!");
  30. }
  31. void loop()
  32. {
  33. // nothing
  34. }