Codey OnlineBiblioteka komponentów Arduino i ESP32 › 1602 LCD I2C DISPLAY
1602 LCD I2C DISPLAY
Wyświetlacze

1602 LCD I2C DISPLAY

wyświetlacz I2C 1602

Szerokość: 76.2 mm

Pinout — 1602 LCD I2C DISPLAY

Pin Sygnał Opis
GND ground Ground reference for the LCD module and I2C interface.
VCC power Power input for the LCD and I2C backpack, typically 5V.
SDA SDA I2C serial data line between the controller and LCD backpack.
SCL SCL I2C serial clock line from the controller to the LCD backpack.

Przykładowy schemat połączeń — 1602 LCD I2C DISPLAY

Z Do Przewód
board:GND x1:GND black
board:5V x1:VCC red
board:A4 x1:SDA green
board:A5 x1:SCL blue

Przykładowy kod Arduino — 1602 LCD I2C DISPLAY

Ten przykład został napisany i sprawdzony kompilacją dla arduino-uno. Codey Online dostosuje go do każdej innej obsługiwanej płytki.

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// Common default I2C address for many 1602 LCD I2C backpacks.
// If your display does not show text, the address may be different (often 0x27 or 0x3F).
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
  lcd.init();
  lcd.backlight();

  Serial.begin(9600);
  Serial.println("1602 I2C LCD example starting...");

  lcd.setCursor(0, 0);
  lcd.print("Hello, world!");
  lcd.setCursor(0, 1);
  lcd.print("I2C LCD ready");
}

void loop() {
  // Demonstrate updating the second line with a running counter.
  static unsigned long counter = 0;

  lcd.setCursor(0, 1);
  lcd.print("Count: ");
  lcd.print(counter);
  lcd.print("      "); // Clear any leftover digits

  Serial.print("Count: ");
  Serial.println(counter);

  counter++;
  delay(1000);
}

Podobne komponenty

1.28" Round TFT LCD 240x240 (GC9A01, SPI)

1.28" Round TFT LCD 240x240 (GC9A01, SPI)

1602 LCD DISPLAY

1602 LCD DISPLAY

8x8 RGB 64 LED Matrix 5V WS2812b

8x8 RGB 64 LED Matrix 5V WS2812b

LCD Display TFT 1.3inch ST7789

LCD Display TFT 1.3inch ST7789

Zbuduj swój projekt Arduino lub ESP32 z pomocą AI

Opisz, co chcesz zbudować. Codey Online napisze kod, narysuje schemat połączeń, skompiluje projekt i wgra go na płytkę bezpośrednio z przeglądarki.

Zacznij za darmo