Giter VIP home page Giter VIP logo

js-raspberrypi-tm1637's Introduction

js-raspberrypi-tm1637

Control LCD display tm1637 from a raspberry pi

Original work from https://github.com/thesadabc/raspberrypi-tm1637-4display

You can control a LCD tm1637 with facultative semi-colon separator

Allowed characters : [aA-zZ],[0-9], ,°,-,=,[,],(,)

Dependencies

You need WiringPi library installed on your raspberry pi.

    sudo apt-get install python-dev python-pip
    sudo pip install wiringpi

Installation

Then install this module that way:

    npm install raspberrypi-tm1637

Usage

Warning !! Using WIRINNGPI pin numerotation ! Please see : https://fr.pinout.xyz/pinout/wiringpi#

    const TM1637 = require('raspberrypi-tm1637');
    const CLKPIN = 29;
    const DIOPIN = 28;
    const tm = new TM1637(CLKPIN, DIOPIN);

    // 4 characters max. Extra characters will be ignored

    tm.text="helo";     // Shows "helo"

    tm.text="2130";     // Shows "21:30"
    tm.split=true;      //

    tm.text="foo";      //
    tm.alignLeft=false; // Shows " foo"
    tm.alignLeft=true;  // Shows "foo "

API

Methods

  • constructor(pinClk, pinDIO)
    • pinClk : int. The clock pin number using WIRINGPI pin numerotation
    • pinDIO : int. The data pin number using WIRINGPI pin numerotation

Properties

  • text : string. Four characters max. Extra chars will be ignored.
  • split : boolean. Default false. Will display the semi-colon separator based on that value. (good for clock or time usage)
  • alignLeft : boolean. Default false. Will align the text, if less than four characters, on the left if true, on the right if false.

Github sources

js-raspberrypi-tm1637's People

Contributors

kevincastejontest avatar

Watchers

James Cloos avatar Kevin Castejon avatar

js-raspberrypi-tm1637's Issues

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.