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

night mode #19

Closed Frystail closed 5 years ago

Frystail commented 5 years ago

Hi lmirel. It says in your project description: "it has night mode from 8pm to 8am when it only shows a moon and 2 twinkling stars and a dimmed display". Is it possible to dim the screen in HariFun watches? If possible, tell me where to prescribe? Thank. P.s. This question was asked by HariFun, he replied that it was impossible to do it now. But you did it? Please help me!

lmirel commented 5 years ago

there are 2 ways to 'dim' the display:

  1. use the setBrightness function of the display - recommended; see https://github.com/lmirel/MorphingClockRemix/blob/no-wm/MorphingClockRemix.ino on line 1201
  2. use 'dimmed' colours in my case, I used 2. at the time I wrote it and didn't change it yet.
Frystail commented 5 years ago

Thanks for the answer. And how can this be transferred to the HariFun Morphing Digital Clock firmware? And then I have your firmware does not work. I can not connect to the clock by wi-fi.

lmirel commented 5 years ago

Someone will need to implement this feature into the original code.

If you have issues with clock configuration via WiFi, you could either use the 'no-wm' branch and configure the WiFi via parameters in the code (params.h file), or disable the icons for first time use and re-enable it after you've configured it. The WiFi manager requires more memory than it has available when the icons are in use.

Frystail commented 5 years ago

lmirel thanks. About the firmware from HariFun, I understood everything. The fact is that I don’t understand programming, can I learn more about params.h file and how to disable icons correctly?

lmirel commented 5 years ago

Checkout the 'no-wm' branch and look at the source code. You'll have to create the params.h file yourself and add the required parameters in it, defined with your own values:

/*

Frystail commented 5 years ago

lmirel, sorry for my ignorance. I do not know English (I use a translator), and I can not understand in any way what does the 'no-wm' branch mean? From here I don’t know how to create the params.h file.

Frystail commented 5 years ago

lmirel, I changed the value of 0.002 in the display_ticker.attach line (0.002, display_updater); at 0.005, I was able to connect via wi-fi and make settings. But at the same time the screen flickers very much. I haven’t figured out params.h yet. Explain how to disable and then enable icons?

lmirel commented 5 years ago

I've updated the 'no-wm' branch with a params.h.example file. Download the branch from here https://github.com/lmirel/MorphingClockRemix/archive/no-wm.zip Rename params.h.example to params.h and update it with your own values for wifi network name, password, weather.org API key if you have any, etc.

I don't know how else to help at this point but hopefully you'll manage.