Coder Social home page Coder Social logo

customhd44780's Introduction

CustomHD44780 Display Driver

CustomHD44780 is a very basic Python-based HD44780 16x2 display driver designed to be customized to work with absolutely any single-board computer, including (but definitely not limited to) the Raspberry Pi and pcDuino.

Example - Raspberry Pi

import RPi.GPIO as GPIO

disp = HD44780Display(GPIO.output, GPIO.setup, ...) # enter your HD44780 pin numbers here
disp.begin()
disp.write("Hello, world!")

How does it work?

CustomHD44780 handles interfacing with the display, but you need to provide two functions to tell the library how to interact with your board's hardware:

  • write_pin(pinNumber, signal) - writes signal (either 1 or 0) to GPIO pin pinNumber.
  • pin_mode(pinNumber, mode) - configures GPIO pin pinNumber to act as an input (mode == 0) or output (mode == 1).

These are given in the constructor of HD44780Display. This flexibility allows the library to work with any board, given you know how to interact with its GPIO pins.

Why use this?

I needed to write a pcDuino HD44780 driver, but decided to make the library modular instead so that it could be adapted to work with any other board.

If you'd like to use them, the two pcDuino GPIO functions are included in pcDuinoFunctions.py.

customhd44780's People

Contributors

aaronc81 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.