// 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));
}
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
'A', 'b', 'C', 'd', 'E', 'F'
'°' // (degree)
'-' // (minus)
/examples/time_display.ino
- with using RTC module displaying current time on current display
Arduino Due
Arduino Leonardo R3
Arduino Uno
Arduino nano
Iskra nano pro