Giter Club home page Giter Club logo

tm74's Introduction

TM74 LED Driver

Arduino library for 4-Bit LED Digital Tube Module with two 74HC595D-chip

image image

Usage

// A0   A1   A2   5V  GND
//  |    |    |    |   |
// SCLK RCLK DIO  VCC GND

// SCLK, RCLK and DIO - control pins for this module
// VCC - 5V pin
// GND - zero pin
#include "TM74.h"
#define SCLK A0 
#define RCLK A1 
#define DIO  A2

TM74 disp(SCLK, RCLK, DIO);

const uint8_t useDot = 0x1;


void loop() 
{ 
    // fill segment data
    const Segment segs[4] = {
        Segment('1'), // 4 display
        Segment('1'), // 3 display
        Segment('2', useDot), // 2 display with enabled dot indication
        Segment('3') // 1 display
    };
    // send data to module
    disp.writeSegments(segs, sizeof(segs) / sizeof(Segment));
}

Symbols support for using in Segment

'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
'A', 'b', 'C', 'd', 'E', 'F'
'°' // (degree)
'-' // (minus)

Examples

/examples/time_display.ino - with using RTC module displaying current time on current display

Tested on

Arduino Due
Arduino Leonardo R3
Arduino Uno
Arduino nano
Iskra nano pro

tm74's People

Contributors

0xf6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.