@iamnotgenius
Firstly, I would like to comment that there are several hardware and library versions for this module.
Libraries I managed to identify at least 3 different ones: (or even more).
1." GitHub - Seeed-Studio/Grove_4Digital_Display: Display for digital tube
2." GitHub - avishorp/TM1637: Arduino library for TM1637 (LED Driver)
3." GitHub - maxint-rd/TM16xx: Arduino TM16xx library for LED & KEY and LED Matrix modules based on TM1638, TM1637, TM1640 and similar chips. Simply use print() on 7-segment and use Adafruit GFX on matrix.
Hardware I managed to identify at least 3 different ones: (or even more).
- Only two dots between digit 2 and digit 3.
- One decimal point for each digit.
- One decimal point for each digit and 2 points between digit 2 and digit 3. (I think something is fake).
See the images below.
As my module had a display with only two dots between digit 2 and digit 3, I removed
the original display and I mounted two 2-digit displays with decimal points on a proto board and connected them instead
of the original display. (It wasn't pretty but it was functional).
Then I wrote a code to only light the DP of each digit.
(I know that the code can be optimized, but even though it is not beautiful, it is functional and meets the need).
Follow the code below the video.
In the video below you can see the result of the assembly and code.
Now let's analyze the displays.
All 3 displays have 12 pins, 1,2,4,5,7,10,11 connected in segments A,B,C,D,E,F,G.(not respectively).
Pins 6,8,9,12 connected to the commons of each digit.
Display n.1. Pin 3 connected to the two points between digit 2 and digit 3.
Display n.2. Pin 3 connected to the DP of each digit.
Display n.3. Pin 3 connected where? connected at the two points between digit 2 and digit 3 or at the DP of each digit?
After all, there are only 12 pins.
With 12 pins it is not possible to connect the 7 segments (7), the 4 commons (4), the DPs (1) and the 2 points (1) separately. (7 + 4 + 1 + 1) = 13.
The datasheets I found are confusing and have gaps in the information on the points.
Ref:
-
3642BS DP, Colon between digit 2 and digit 3.
I couldn't find the data sheet for this type.
-
3641BS DP, of each digit.
"http://www.xlitx.com/datasheet/3641BS.pdf
-
ELF-5463A-B, DP of each digit and colon between digit 2 and digit 3.????
"https://www.yitenuo.com/download/4/ELF-5463A-B.pdf
image:
Video:
"I don´t now how upload video. . I will try later.....
PS: I couldn't upload video.
But it is available at: Imgur: The magic of the Internet
Code:
#include <Arduino.h>
#include <TM1637Display.h>
#define CLK 2 // To TM1637 Clock pin
#define DIO 3 // To TM1637 DIO pin
#define TEST_DELAY 500 // delay for each display
TM1637Display display(CLK, DIO); // TM1637 instance
//--------------------------------------------------------------------------
void setup() {
}
//--------------------------------------------------------------------------
void loop() {
uint8_t data[] = {0x80}; // Data to on DP to display
uint8_t limpa[] = { 0x00, 0x00, 0x00, 0x00 }; // Data to OFF all displays
display.setBrightness(0x0f); // Set Bright
display.setSegments(limpa); // OFF all displays
delay(TEST_DELAY); // Delay
for (int j = 0; j < 4; j++) { // Run ON each DP point
display.setSegments(data, 1, j); // Turn ON DP of display point by j
delay(TEST_DELAY); // Delay
display.setSegments(limpa); // OFF all displays
delay(TEST_DELAY); // Delay
}
for (int j = 0; j < 3; j++) { // Run ON 2 DP points
display.setSegments(data, 1, j); // Turn ON DP of display point by j
delay(TEST_DELAY); // Delay
display.setSegments(data, 1, j + 1); // Turn ON next DP (j +1)
delay(TEST_DELAY); // Delay
display.setSegments(limpa); // OFF all displays
delay(TEST_DELAY); // Delay
}
for (int j = 0; j < 2; j++) { // Run ON 3 DP points
display.setSegments(data, 1, j); // Turn ON DP of display point by j
delay(TEST_DELAY); // Delay
display.setSegments(data, 1, j + 1); // Turn ON next DP (j +1)
delay(TEST_DELAY); // Delay
display.setSegments(data, 1, j + 2); // Turn ON next DP (j +2)
delay(TEST_DELAY); // Delay
display.setSegments(limpa); // OFF all displays
delay(TEST_DELAY); // Delay
}
for (int j = 0; j < 1; j++) { // Run ON 4 DP points
display.setSegments(data, 1, j); // Turn ON DP of display point by j
delay(TEST_DELAY); // Delay
display.setSegments(data, 1, j + 1); // Turn ON next DP (j +1)
delay(TEST_DELAY); // Delay
display.setSegments(data, 1, j + 2); // Turn ON next DP (j +2)
delay(TEST_DELAY); // Delay
display.setSegments(data, 1, j + 3); // Turn ON next DP (j +3)
delay(TEST_DELAY); // Delay
display.setSegments(limpa); // OFF all displays
delay(TEST_DELAY); // Delay
}
}