lmirel / MorphingClockRemix

a remix on the work of HarryFun's MorphingClock
https://www.instructables.com/id/Morphing-Digital-Clock/
78 stars 30 forks source link

Display flicker #20

Closed Frystail closed 5 years ago

Frystail commented 5 years ago

Imirel, thank you for your help and for the firmware that eliminates the setting of the clock via wi-fi. But sadly, the clock did not start, displaying the inscription "connection". In the line "display_ticker.attach line (0.002, display_updater);", I changed the value to "0.004. Everything started to work, but an eerie display flicker appeared. I could not get rid of the display flicker. Replaced NodeMCU, on WeMos D1 R1. Everything started up perfectly and works. But the display brightness is excessive. Tell me in which lines to prescribe my brightness values ​​for day and night mode?

lmirel commented 5 years ago

You might want to test different values for display.setBrightness (X); Add the following at line 190:

display.setBrightness (200);

Use different values instead of 200 to see what works best for you. These vary from 255 (brightest) to 0 (dimmest).

As explained earlier, I don't use brightness control yet, just use less brighter colours for night mode.

Frystail commented 5 years ago

Imirel, I may have climbed in the wrong place, that's what I changed: if (hh> = 20 && cin == 50)     {       cin = 10;       Serial.println ("night mode brightness");       daytime = 0;     }     if (hh <8 && cin == 50)     {       cin = 10;       Serial.println ("night mode brightness");       daytime = 0;     }     // during the day, bright     if (hh> = 8 && hh <20 && cin == 10)     {       cin = 50;       Serial.println ("day mode brightness");       daytime = 1;     } The brightness has decreased, but the weather icon has remained very bright, even hurting the eyes. Tell me how to see line numbers in the Arduino IDE. At me they are not displayed.

Frystail commented 5 years ago

display.setBrightness (200);

Thanks, it helped. But I really want the top and bottom lines to be darker than the clock. This can be done?

P.s. What do the numbers in the lower left and lower right corners mean?

lmirel commented 5 years ago

it can be done but only by tweaking color data. setBrightness sets all pixels to same brightness.

the numbers in the lower corners represent min/max temp values for the current period (next 5min or so)

Frystail commented 5 years ago

it can be done but only by tweaking color data. setBrightness sets all pixels to same brightness.

Will it be difficult to give line numbers to edit the elements of the bottom and top lines?

Frystail commented 5 years ago

lmirel, thank you very much for your help. Everything suits me. Last question. Do the numbers in the upper right corner show pressure? If so, how can I make it display in millimeters of mercury?

lmirel commented 5 years ago

yes, that is pressure but I don't know if the weather info contains this info the way you want it. maybe try looking at what you get around line 324 and 392

Frystail commented 5 years ago

lmirel, thanks. I think I can hardly figure it out. Let it be as it is. And everything else works wonderfully. Thank you very much.

lmirel commented 5 years ago

enjoy