Skip to content
/ TM74 Public

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

License

Notifications You must be signed in to change notification settings

0xF6/TM74

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages