I'm having trouble getting my NodeMCU connected to 4 x 4 Digit 7 Segment Displays.
So far I've been able to connect 2 & get them to display things from the demo repository.
However, after trying all possible combinations of different pins & looking up the pinout reference I have no idea why I can't get them to work.
Any help would be greatly appreciated.
I'm working with:
ESP8266 NodeMCU ESP-12E (CP2102)
4 Digit 7 Segment Display (TM1637)
As suggested @romkey:
#include <Arduino.h>
#include <TM1637Display.h>
// Module connection pins (Digital Pins)
#define CLK_1 D2
#define DIO_1 D3
#define CLK_2 D5
#define DIO_2 D6
#define CLK_3 13
#define DIO_3 15
// The amount of time (in milliseconds) between tests
#define TEST_DELAY 500
TM1637Display display1(CLK_1, DIO_1);
TM1637Display display2(CLK_2, DIO_2);
TM1637Display display3(CLK_3, DIO_3);
void setup()
{
}
void loop()
{
int k;
uint8_t data[] = { 0xff, 0xff, 0xff, 0xff };
uint8_t blank[] = { 0x00, 0x00, 0x00, 0x00 };
display1.setBrightness(0x0f);
display2.setBrightness(0x0f);
display3.setBrightness(0x0f);
// Brightness Test
for(k = 0; k < 4; k++)
data[k] = 0xff;
for(k = 0; k < 7; k++) {
display1.setBrightness(k);
display1.setSegments(data);
display2.setBrightness(k);
display2.setSegments(data);
display3.setBrightness(k);
display3.setSegments(data);
delay(TEST_DELAY);
}
while(1);
}
I've tried addressing the CLK_3 & DIO_3 pins as "Dx" but that didn't work as well.
Repos used: