Control a TM1637 4-digits led segments driver using javascript and johnny-five.
npm install tm1637 
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.
npm i tm1637
``js
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
});
});
`
- Pins are johnny-five compatible pins
- board is a johnny-five board or any object which support pinMode, digitalRead, digitalWrite` methods;
- TM1637 english datasheet
- https://github.com/thesadabc/raspberrypi-tm1637-4display
- https://github.com/timwaizenegger/raspberrypi-examples/blob/master/actor-led-7segment-4numbers/tm1637.py