[Solved] Received new TM1637 but not working?
[Solved] Received new TM1637 but not working?
If you purchased TM1637 LED display and it is not showing anything. Watch this video to fix the issue. Use the code bellow to test it.- download TM1637 Manual
- TM1637 Library (from Robojax.com)
- TM1637 Data sheet
- TM1637 Library (from GetHub)
/*
* This is the Arduino code for TM1637 4 digits display.
* *
* Written by Ahmad S. for Robojax Video
* Date: Dec 06, 2017, in Ajax, Ontario, Canada
* Permission granted to share this code given that this
* note is kept with the code.
* Disclaimer: this code is "AS IS" and for educational purpose only.
Watch the video for this code: https://youtu.be/F5rhnFX3_w8
*
*/
/*
* Original code from https://github.com/avishorp/TM1637
* Modified for Robojax video on Dec 06, 2017
*/
#include <Arduino.h>
#include <TM1637Display.h>
// Module connection pins (Digital Pins)
#define CLK 2
#define DIO 3
// The amount of time (in milliseconds) between tests
#define TEST_DELAY 2000
TM1637Display display(CLK, DIO);
void setup()
{
}
void loop()
{
display.setBrightness(0x0f);
uint8_t data[] = { 0x0, 0x0, 0x0, 0x0 };
display.setSegments(data);
display.showNumberDec(23, false, 2,1);
delay(TEST_DELAY);
display.setSegments(data);
display.showNumberDec(153, false, 3, 1);
delay(TEST_DELAY);
display.setSegments(data);
for(int i=0; i<=500; i++)
{
display.showNumberDec(i);
}
}