GithubHelp home page GithubHelp logo

lcd's Introduction

LCD

Module for driving an LCD display attached to the SPI interface. Exports a class defining the interface for the LCD. Extendable with different LCD models by inheriting from base-class and overwriting functions.

Properties

  • @property {number} [pinCd] GPIO pin of the CD line (MANDATORY)
  • @property {number} [pinRst] - GPIO pin of the RST line (MANDATORY)
  • @property {number} [speedHz] - the communication speed to the display, default: as defined in derived constructor
  • @property {number} [spiController=0] - the SPI controller, e.g. 1=SPI1, default: 0=SPI0
  • @property {number} [chipSelect=0] - the Chipselect line, e.g. 0=SPIx.0, default:0
  • @property {number} [viewDirection=0] - Display viewed from 1=top or 0=bottom, default: bottom
  • @property {number} [line=0] - start line of the display 0...63
  • @property {boolean} [inverted=false] - display inverted, true or false
  • @property {number} [biasRatio=0] - ratio 1/9: 0, ratio 1/7: 1
  • @property {number} [volume=10] - contrast setting 0..63

Methods

Constructor

initialize(options){

clearColumns(count, style) - tested

Clears count columns on the current page from the current cursor position. If count is larger than the amount of columns to the right, the number gets subtracted. Style determines, if the pixels should be off (set to 0) or on (set to 1)

clearPage(style) - tested

Clears all columns on the current page. Style determines, if the pixels should be off (set to 0) or on (set to 1)

clearArea (pages, columns, style)

clearAreaXY(pages, columns, style, page, col)

moveToColPage(column, page) - tested

Moves the cursor to the specified column on the specified page (i.e. group of 8-pixel lines the LCD)

moveBy(pages, columns){

set Contrast(value){

clear()

transfer(messageType, msg) - tested

Transfers a Command or a message to the LCD by bit-banging on the SPI interface. Message type defines, whether a command or message data is sent. Setting this to "0" sends command data, "1" sends bitmap data. The msg must contain an array of byte values.

async writeText(text, font, style)

async writeLine(text, font, style)

swing(text, font, style, page, stepInterval, stepSizePix)

step(text, font, style, page, stepInterval)

close()

lcd's People

Contributors

7h0mas-r avatar

Watchers

 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.