Wordclock mirror - ESPHome

I’m going nuts here!!
Some time works, and some it does not (most of the time) I solder and clean everythig, check and recheck… my wife is about to kill me!
If I connect the strip and it has not been connected for a while it kind of works. If I disconnect and reconnect rigt away then it does not work. I have to wait a while…
I’m ussing a d1 mini (clone), injecting 5 volts 2 Amp.
What is it??

IMG_1131
IMG_1130


IMG_1129

What strip do you use?
-Try to use another data pin on the esp.
-Connect to other row of LEDs to rule out issues with first led

1 Like

I use an other pin and it works. Thanks!!

1 Like

Here is the finish product!


2 Likes

@jjansen85 Could you share a picture of how your led’s are wired?
As the order is different from the original, as your “het is” starts on 113,93,92, 72, 53 and not on 0,1,2,3,4,5

I like the extra part in your code for projecting the numbers, at least that is what I guess from your code, as it looks garbled now on my setup… :slight_smile:

Sure, this is my setup

Notice that the first led has number 1.
In coding this should be number 0.

In my coding exampel there is a mistake with respect to this.
Now it states

int leds_time_it_is[] = {113,93,92, 72, 53}; // ES IST
int leds_minutes[] = {114, 12, 1, 103}; // Minutes LEDS

These should be all compensated by -1:

int leds_time_it_is[] = {112,92,91, 71, 52}; // ES IST
int leds_minutes[] = {113, 11, 0, 102}; // Minutes LEDS

In my actual code I correct this with at [i]-1

strip.SetPixelColor(leds_time_it_is[i]-1, color);

I have made the English one from here: diode laser wiki which is based on the Wothur version but there are few strange things with that firmware so I would like to convert it to ESPhome.

Does anyone have an ESPHome English version of this before I try to do the conversion.

Hi everyone,
does anyone have a transformer recommendation.
I would like to attach the clock to the proposed wall lamp location with 230 V.

Would be very grateful for a tip

I am trying to compile the code but I get these errors. Can somebody explain the problem.

In file included from src/main.cpp:22:0:
src/wordclock.h:66:60: error: expected class-name before '{' token
 class Wordclock : public Component, public CustomAPIDevice {
                                                            ^
src/wordclock.h: In member function 'virtual void Wordclock::setup()':
src/wordclock.h:77:96: error: 'register_service' was not declared in this scope
             register_service(&Wordclock::on_setled, "setled", {"number","red", "blue", "green"});
                                                                                                ^
src/wordclock.h: In member function 'virtual void Wordclock::loop()':
src/wordclock.h:88:28: error: 'current_time' was not declared in this scope
             auto time = id(current_time).now();
                            ^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-nonnull-compare" [enabled by default]
*** [.pioenvs/wordclock/src/main.cpp.o] Error 1