Skip to content

Control a 4 digit led segments TM1637 driver using javascript and johnny-five.

Notifications You must be signed in to change notification settings

revolunet/tm1637

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tm1637.js

experimental

Control a 4 digit led segments TM1637 driver using javascript and johnny-five.

pic

Largely inspired from raspberrypi-tm1637-4display and timwaizenegger/raspberrypi-examples.

Tested with a 4 digits, 4 decimal points tm1637 display from catalex.

Install

npm i tm1637

Usage

const five = require('johnny-five');
const Raspi = require('raspi-io');

const tm1637 = require('tm1637');

const board = new five.Board({
  io: new Raspi()
});

board.on("ready", () => {
  const display = tm1637({
    clk: "GPIO21",
    dio: "GPIO20",
    board: board
  })

  display.show("3.142");

  board.repl.inject({
    display
  });
});

Related

About

Control a 4 digit led segments TM1637 driver using javascript and johnny-five.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published