Coder Social home page Coder Social logo

adafruit_circuitpython_charlcd's Introduction

Introduction

This library is compatible with standard Character LCDs such as:

Compatible with CircuitPython Versions: 2.x

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Usage Example

The Character_LCD class interfaces a predefined Character LCD display with CircuitPython.

import adafruit_character_lcd

You must define the data pins (RS, EN, D4, D5, D6, D7) in your code before using the Character_LCD class. If you want to have on/off backlight functionality, you can also define your backlight as lcd_backlight. Otherwise, the backlight will always remain on. An example of this is below

lcd_rs = digitalio.DigitalInOut(D7)
lcd_en = digitalio.DigitalInOut(D8)
lcd_d7 = digitalio.DigitalInOut(D12)
lcd_d6 = digitalio.DigitalInOut(D11)
lcd_d5 = digitalio.DigitalInOut(D10)
lcd_d4 = digitalio.DigitalInOut(D9)
lcd_backlight = digitalio.DigitalInOut(D13)

You must also define the size of the CharLCD by specifying its lcd_columns and lcd_rows:

lcd_columns = 16
lcd_rows = 2

After you have set up your LCD, we can make the device by calling it

lcd = adafruit_character_lcd.Character_LCD(lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows, lcd_backlight)

To verify that your pins are correct, print a hello message to the CharLCD:

lcd.message('hello\ncircuitpython')

Custom character example with create_char() is provided within /examples/

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Installation

This library is NOT built into CircuitPython to make it easy to update. To install it either follow the directions below or :ref:install the library bundle <bundle_installation>.

To install:

#. Download and unzip the latest release zip <https://github.com/adafruit/Adafruit_CircuitPython_CharLCD/releases>_. #. Copy the unzipped adafruit_character_lcd to the lib directory on the CIRCUITPY or MICROPYTHON drive.

API

.. toctree:: :maxdepth: 3

api

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.