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