pdf-icon

Unit Digi-Clock

SKU:U146

Description

UNIT-Digi-Clock is a 2.1 inch 4-digit 7-segment display module. There are decimal points on each digit and an extra wire for colon-dots in the center, which can display Decimals and Clock. This module adopts TM1637 as the driver IC, and STM32F030 as I2C communication. I2C address can be modified per 4-bit dip switch. The red LED supports 8 brightness. And we have reserved 4 fixing holes there.

Features

  • 4-digit red dislpay
  • I2C port, adjustable I2C address
  • 8 brightness
  • Low power consumption
  • 4 fixing holes for multiple installations

Includes

  • 1x UNIT-Digi-Clock
  • 1x HY2.0-4P Cable (20cm)

Application

  • Clock display
  • Data display
  • Stop watch

Specifications

Spec Parameters
MCU STM32F030
Driver IC TM1637
Communication I2C, addr: 0x30
Power Supply 5V DC
Net Weight 12.5g
Gross Weight 17.8g
Product Dimension 50 * 31 * 14mm
Package Dimension 136 * 92 * 15mm

Power Consumption Testing

Environments Current on DC5V
Standby Mode(All off) 2.5mA
SG1 6.6mA
SG2 10.3mA
SG3 17.5mA
SG4 38.7mA
SG5 42.0mA
SG6 45.7mA
SG7 49.2mA
SG8(All on) 52.5mA

Schematic

I2C Register Table

Character cross-reference table

Examples

Arduino

#include "Wire.h"
#include "M5UNIT_DIGI_CLOCK.h"

/* For M5Stack Basic */
#define SDA 21
#define SCL 22
#define ADD 0x30

/* For M5Atom Lite/Matrix */
// #define SDA 26
// #define SCL 32
// #define ADD 0x30

M5UNIT_DIGI_CLOCK Digiclock;

void setup() 
{
    delay(2000);
    Serial.begin(115200);
    Wire.begin(SDA, SCL);

    /* Digital clock init */
    if (Digiclock.begin(&Wire, SDA, SCL, ADD)) 
    {
        Serial.println("Digital clock init successful");
    } 
    else 
    {
        Serial.println("Digital clock init error");
        while (1);
    }
    char buff[] = "    ";
    Digiclock.setString(buff);
    delay(2000);
}

void loop() 
{
    char buff[] = "8.8.:8.8.";
    Digiclock.setString(buff);

    for (int i = 0; i < 5; i++) 
    {
        Digiclock.setBrightness(9);
        delay(150);
        Digiclock.setBrightness(0);
        delay(150);
    }
    delay(100);

    for (int i = 0; i < 4; i++) 
    {
        for (uint8_t i = 0; i < 9; i++) 
        {
            Digiclock.setBrightness(i);
            delay(20);
        }
        for (uint8_t i = 8; i > 0; i--) 
        {
            Digiclock.setBrightness(i);
            delay(20);
        }
    }
    delay(100);

    Digiclock.setBrightness(9);
    for (int j = 0; j < 3; j++) 
    {
        for (int i = 0; i < 10; i++) 
        {
            sprintf(buff, "%d.%d.:%d.%d.", i, i, i, i);
            Digiclock.setString(buff);
            Serial.println(buff);
            delay(200);
        }
    }
    delay(100);

    Digiclock.setBrightness(9);
    for (;;) 
    {
        char buff2[] =  "12:00";
        Digiclock.setString(buff2);
        Serial.printf(buff2);
        delay(1000);
        char buff3[] =  "1200";
        Digiclock.setString(buff3);
        Serial.printf(buff3);
        delay(1000);
    }
    delay(100);
}

UIFlow

How to use Blockly digi_clock on the UIFlow 1.0 graphical programming platform and related API instructions
How to use Unit digi_clock and related API instructions in the UIFlow2.0
  • UIFlow2.0 Digi-Clock Unit