Datasheet
7
6. Usage
6.1 With TI LaunchPad
Displaying the Numbers (4-Digital-Display)
This example demonstrates how to display some digital numbers using a Grove-4-Digital Display.
/*
* TM1637.cpp
* A library for the 4 digit display
*/
#include "TM1637.h"
#define CLK 39 //pins definitions for TM1637 and can be changed to other
ports
#define DIO 38
TM1637 tm1637(CLK,DIO);
void setup()
{
tm1637.init();
tm1637.set(BRIGHT_TYPICAL);//BRIGHT_TYPICAL = 2,BRIGHT_DARKEST =
0,BRIGHTEST = 7;
}
void loop()
{
int8_t NumTab[] =
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};//0~9,A,b,C,d,E,F