Módulo Interface p/ LCD1602 IIC/I2C p/ Funduino
€5,95
Adicionar ao Carrinho de Compras- SKU :: FUN-MD0063
- Tipo:: Arduino - Funduino
- Marca:: Funduino
Descrição
Sample code 1:1234567891011121314151617181920#include#include#includeLiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Addr, En, Rw, Rs, d4, d5, d6, d7, backlighpin, polarityvoid setup(){lcd.begin(16,2);lcd.backlight();lcd.setCursor(0, 0);lcd.print("Hello world!");lcd.setCursor(0, 1);lcd.print("Row number: ");lcd.setCursor(12, 1);lcd.print("2");}void loop(){}Sample code 2:1234567891011121314151617181920212223242526272829303132333435363738394041424344#include#include#includeLiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Addr, En, Rw, Rs, d4, d5, d6, d7, backlighpin, polarityvoid setup(){lcd.begin(16,2);lcd.backlight();lcd.setCursor(0, 0); //First column, first rowlcd.print("Hello world!");lcd.setCursor(0, 1); //First column, second rowlcd.print("Row number: ");lcd.setCursor(12, 1); //12th column, second rowlcd.print("2");lcd.blink(); //start blinking cursordelay (3000); //delay 3 seconds}void loop(){demoDisplay();}void demoDisplay(){lcd.clear(); // clear display, set cursor position to zerolcd.setBacklight(HIGH); // Backlight onlcd.setCursor (0,0); //col 0 of line 1lcd.print("Boot sequence");lcd.setCursor (0,1); // go col 0 of line 2lcd.print("starting.");lcd.noBlink(); //stop blinking cursordelay(1000); //delay 1 secondwipeLines(); //run function wipeLines}void wipeLines() {for (int y = 0; y for (int x = 0; x lcd.setCursor (x,y);lcd.print(" ");delay(10);}}}