SKU: OT850-C36 Varenummer: AA013 EAN: 8720589817180
1602 LCD med I2C-modul forloddet. Klar til brug i dit Arduino-, ESP32-, ESP8266- eller Raspberry Pi-projekt. Meget nemmere end uden dette modul. Nu er der kun brug for 4 ledninger til at styre dette LCD-display.
LCD med blå baggrundsbelysning og hvide tegn. 2 linjer, 20 tegn pr. linje. Kontrast er (softwaremæssigt) justerbar.
– Fungerer på: 5V
– Mål: 98mm x 60mm x 15mm.
Inkl. I2C-modul!
Kom hurtigt i gang med dette OTRONIC 1602 LCD-display med I2C-modul Download OTRONIC 1602 LCD HURTIGSTARTGUIDE for et tilslutningsdiagram og eksempelcode til Arduino IDE-softwaren.
Mål
Længde: 8cm
Bredde: 2,6cm
Højde: 1,1cm
Sådan tilslutter du 1602 LCD blå baggrundsbelysning med I2C forloddet til en Arduino UNO eller ESP32, med en eksempelsketch, du kan uploade med det samme.
Tilslut 1602 I2C LCD-displayet til Arduino Uno med kun fire ledninger. Sketchen initialiserer displayet, aktiverer baggrundsbelysningen og viser en hilsen sammen med en live oppetidstæller, der opdateres hvert sekund. Juster det lille potentiometer på bagsiden af modulet, hvis teksten virker for svag eller for mørk.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : 1602 I2C LCD Display Demo
* Board : Arduino UNO (arduino:avr:uno)
* Parts : 1602 LCD I2C DISPLAY
* Libraries : LiquidCrystal I2C 1.1.2
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 for a 16 chars and 2 line display
// (If your display stays blank, try address 0x3F)
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
Serial.begin(115200);
Serial.println(F("Starting 1602 I2C LCD demo..."));
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print(F("Hello, World!"));
}
void loop() {
// Display the running uptime in seconds on the second line
unsigned long seconds = millis() / 1000;
lcd.setCursor(0, 1);
lcd.print(F("Uptime: "));
lcd.print(seconds);
lcd.print(F("s "));
Serial.print(F("Uptime: "));
Serial.print(seconds);
Serial.println(F(" s"));
delay(1000);
}
Nødvendige biblioteker: LiquidCrystal I2C 1.1.2
Wiring diagram and example code generated by Codey.online — https://www.codey.online
Dette projekt viser, hvordan man tilslutter et 5V 1602 I2C LCD-display til en ESP32 ved hjælp af en logic level shifter for sikker tovejskommunikation. Displayet initialiseres, tænder baggrundsbelysningen og viser en velkomstbesked sammen med en opdaterende uptime-tæller.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : ESP32 1602 I2C LCD Display Demo
* Board : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
* Parts : 1602 LCD I2C DISPLAY
* Libraries : LiquidCrystal I2C 1.1.2
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set LCD I2C address (commonly 0x27 or 0x3F) and dimensions (16 columns, 2 rows)
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
// Initialize I2C with ESP32 default pins: SDA (GPIO 21), SCL (GPIO 22)
Wire.begin(21, 22);
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("ESP32 LCD Demo");
lcd.setCursor(0, 1);
lcd.print("Uptime: ");
}
void loop() {
// Update uptime counter in seconds
lcd.setCursor(8, 1);
lcd.print(millis() / 1000);
lcd.print("s ");
delay(500);
}
Nødvendige biblioteker: LiquidCrystal I2C 1.1.2
Wiring diagram and example code generated by Codey.online — https://www.codey.online