1602 LCD Hat for Raspberry Pi View larger

Imaginile sunt utilizate exclusiv cu titlu de prezentare. Fotografiile nu creează obligații contractuale.

1602 LCD Hat for Raspberry Pi

0104110000009838

New product

LCD Hat 1602 for Raspberry Pi that includes a 2-line and 16-column alphanumeric display, an RGB LED and a keyboard.


See description for more details about the product.

Add to cart now!

More details

32 Items

57,99 lei
tax incl.

Valid in the limit of the available stock

The price includes the costs for collection, treatment and ellimination of WEEE

Add to wishlist

More info

Description

Raspberry Pi Hat LCD Plate includes a 16-line and 2-column alphanumeric LCD display, an RGB LED, contrast-trimmer trimmer and keyboard.

This board has an I2C interface, based on the integrated MCP3017 circuit board, an I / O expansion chip that allows control of the 2-pin LCD from Raspberry Pi.


Specifications

  • 16-line, 2-column alphanumeric LCD
  • Integrated RGB LED
  • Trimmer to adjust contrast
  • Keyboard
  • I2C interface


Instructions for use

We recommend using the Raspibian operating system for this LCD.

First we update packages:

sudo apt-get update

sudo apt-get upgrade

Install git:

sudo apt-get install git-core

Download Wiring Pi:

git clone git://git.drogon.net/wiringPi

We compile Pi Wiring:

cd wiringPi

/build

We enable the I2C interface from the advanced options menu of raspi-config:

sudo raspi-config

Now the board must be reset to start with I2C enabled. After restart I2C load the I2C driver and scan the I2C bus:

sudo modprobe i2c-dev

sudo i2cdetect -y -a 1

Now a device identified on I2C at 0x20 has to appear.

To test the LCD, write the following code in the lcd1602.c file:

#include <stdio.h>                                                                        
#include <wiringPi.h>                                                             
#include <mcp23017.h>
#include <lcd.h>
 
int main ()
{
        int display, i, count;
        wiringPiSetup ();
        mcp23017Setup (100, 0x20);
        printf ("Raspberry Pi - MCP23017 Test");
        for (i = 0; i <16; i ++)
          pinMode (100 + i, output);
        digitalWrite (114.0);
        display = lcdInit (2,16,4,115,113,112,111,110,109,0,0,0,0);
        lcdHome (display);
        lcdClear (display);
        lcdPosition (display, 0.0);
        lcdPuts (display, "Hello World");
        while (1)
        {
                lcdPosition (display, 0.1);                                                                                       
                lcdPrintf (display "% d", count ++);
                delay (300);
                printf ( "lcd1602n");
        }
}

We compile the program:

gcc lcd1602.c /home/pi/wiringPi/devLib/lcd.o -lwiringPi -o lcd1602

We run the program and we should see a text on the screen:

./lcd1602


Don't delay, buy today.


Add to cart now!

Reviews

Grade 
11/07/2020

Python code

Pentru cine doreste sa il foloseasca prin Pyhton
https://learn.adafruit.com/adafruit-16x2-character-lcd-plus-keypad-for-raspberry-pi/python-usage

Grade 
06/04/2020

Dumitru

Comanda at fi:
gcc lcd1602.c -lwiringPi -lwiringPiDev -o lcd1602
Si nu mai e nevoie sa ai sursele de wiringPi doar sa fie instalat pachetul.

Grade 
08/14/2018

I2Cdetect

Inainte de sudo i2cdetect -y -a 1 adaugati va rog sudo apt-get install -y i2c-tools !

Mi-am spart putin capul pana am inteles :). E un produs foarte interesant !

  • 11 out of 13 people found this review useful.

Write your review!

Write a review

1602 LCD Hat for Raspberry Pi

1602 LCD Hat for Raspberry Pi

LCD Hat 1602 for Raspberry Pi that includes a 2-line and 16-column alphanumeric display, an RGB LED and a keyboard.


See description for more details about the product.

Add to cart now!

Customers who bought this product also bought: