Код для поиска

Solved: Received new TM1637 but it is not working

Solved: Received new TM1637 but it is not working

If you purchased a TM1637 LED display and it is not showing anything, watch this video to fix the issue. Use the code below to test it. download TM1637 Manual TM1637 Library (from Robojax.com) TM1637 Data sheet TM1637 Library (from GitHub)
186-Solved: Received a new TM1637, but it is not working.
Язык: C++
/*
 * This is the Arduino code for TM1637 4-digit display.
 
 *  * 
 * Written by Ahmad S. for Robojax Video
 * Date: December 6, 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 purposes 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 December 6, 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);
  }

}

Ресурсы и ссылки

Файлы📁

Нет доступных файлов.