Welcome to Pico-Green-Clock Discussions! #1
Replies: 9 comments 15 replies
-
Thank you André for creating this discussion! Hopefully more users will join and contribute. |
Beta Was this translation helpful? Give feedback.
-
Hello all, and "Thanks, André" for starting this discussion. Eric, like you, I've previously exchanged email with André. We discussed "internationalization" (often abbreviated "i18n") and the need to support multiple languages for settings. Unlike previous generations of appliances, this new generation comes with fast processors, large address spaces, and large onboard flash: 2 million bytes. Bill Gates famously said he didn't see a need for anyone to have more than 65 thousand bytes, or so! A good use for that flash memory is multi-lingual support. Also, let me point out the rabbit hole you are heading down with Summer time/Daylight Savings time. (By the way, the naming of the time shift falls under an issue related to language support, but is known as "localization" -- Brits and Americans are often described as two people who are joined by an ocean, and divided by a common language :) Let me get back to time changes: this is non-trivial -- it is entirely a political decision, and politicians change their minds all the time! Americans are debating permanent adoption of Daylight Savings Time. Will you issue updates to your clock software when that happens? How long will you support these updates? Next year? Ten years from now? I have clocks older than that! There is no way to future-proof clock firmware. Instead, think about ways of making the time shift easier. When displaying time, some presses "up" add an hour! "Down" pressed? Subtract an hour. There's nothing to learn! And this allows you to easily move the clock to most other time zones. People aren't going to forget setting the time when it's this easy -- and yes, pressing "mode" will advance to minutes -- for those oddball timezones (Newfoundland, Iran, India, Nepal, parts of Australia) or people who like to live in their own five-minutes-early time zone. Also, the Pico W adds whole new dimensions for literally(!) pocket change. Consider using http://worldtimeapi.org/ to get info about the current timezone, and daylight/summer time. Properly putting the clock on someone's network involves a little two-step to acquire their local network credentials. I'm investigating some related work using the raspberry pi zero to see if it can be leveraged. Other things I'm working on, are to use the PIO state machines, to handle the LED refresh. This is often handled by hardware, so removing it from the clock would make the internationalization/ localization more useful, and able to be shared with other clocks. The typical way of handling translations is to hash the string you want, and look up it's translation at runtime. If there is no translation available, let the user upload one (we have crowd sourcing on the internet now!) and provide a default. That way you can support many languages, without requiring them compiled into your code. (And it separates the translation from the coding.) Te clock itself should accept translations in Unicode, and downgrade them (e.g., remove accents) to match what can be shown on the display . The Pico-Green-Clock has very short display, and accents aren't legible -- but the translation should allow a clock with a 320x240 LCD to display them correctly, without incurring the costs, in time and money, of requiring new translations. I'm currently playing with a couple of different clocks, and hoping to share the software base between them. I'm eager to see what others are doing with their clocks, and thanks again, André, for starting the discussion. |
Beta Was this translation helpful? Give feedback.
-
https://data.iana.org/time-zones/tz-link.html
Have at it ))
-olav
…Sent from my iPad
On Oct 23, 2022, at 23:06, astlouys ***@***.***> wrote:
Hi Olav,
Thank you for joining us and sharing ideas about the Green Clock and its firmware...
A few words about "Daylight saving time" (DST)...
I must confess something: when I first saw the Pico Green Clock on Amazon, I was looking for an electronic clock that could automatically handle DST since I was frustrated to have to adjust all the clocks in the house twice a year (yeah,,, I'll still have many other clocks and equipment requiring adjustment anyway, but...). When I've seen the Green Clock, I thought "great! if ever it does not support DST, I'll implement it!" So, you understand why I want it to be automatic and why it is one the first options I worked on (I added it in Version 2.00) - smile. The way DST is implemented in the code would make it relatively easy to implement other "standards" for different countries. If ever in ten years, someone needs a new standard that is not supported, in the worst case, he will have to manually adjust it (the same way I'm doing now with all the clocks throughout the house - too bad).
That being said, I like your idea of a fast "increase" / fast "decrease" by one hour. To make it easier and faster. I may take a look at this after publishing Version 6.00. The main problem with the "basic" product is the limitation due of the three clock buttons. I may give it a first try with the remote control.
As for the situation if ever politicians decide to keep the same time all-year round, this is already supported in current version (User guide of Version 5.00, page 20, section 6 - Option 0).
I didn't have the chance to work with the Pico-W yet, but I will definitively give it a try, sooner or later. (my work on micro-controllers is simply a hobby, after all !). This should add the possibility to set the clock time using NTP.. As you mention, problem comes from the fact that we need to enter credentials, either at compile time, either at run-time but then, we need some device to do it. Let me know if you come-up with something interesting with the Pi Zero.
LED refresh:
I thought about using PWM to do it and free the Pico from this task. However, I'm not sure it's "that easy" to do, since there seems to be some timings that are inter-related (clock display is turned Off before scanning change from column to column and things like that). Since more than one PWM signal are available on the clock and they all originate from the same basic clock, it may be possible to synchronize everything - if ever it needs to be - but I guess this requires some planing beforehand.
Multi-language translations:
Flashing languages to Pico's memory is a good idea. I could probably help someone to do it whenever someone volunteer to implement a new language. A separate tool to flash languages would then be required and since I worked this code (writing to flash) in Version 6.00, such a tool would be relatively easy.
Thanks again for your comments, Olav.
André
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
Hi guys,
Quick hour setting with the +/- buttons without even having to enter the time setting menu: why not, however having to change the time twice yearly is not much of a hassle either (to me at least). The Pico W is an interesting way to go in order for the clock to fetch the current time, but apart from the WiFi connection wizard or SSID/password input required either at compile time or runtime, I believe it would also be necessary to input the user's timezone, right? It could be fetched from the IP address geolocation information though, I guess. Selecting a network and inputting long and complex alphanumeric WPA credentials from the clock itself could be a real pain. It would be easier to handle at compile-time, but it makes it less accessible of course.
|
Beta Was this translation helpful? Give feedback.
-
Hi, I have made a pull request with a new language, Czech. I would like to hear your opinion. |
Beta Was this translation helpful? Give feedback.
-
Thanks for a new version! If develooper mode is set, the compilation makes a warning: Probably not really a bug, but it took me some time to understand - if developer mode is set, files CalendarEventsAndre.cpp and RemindersAndre.cpp are missing - maybe generic versions should be here. The same applies for Credentials.cpp at line 2284, I had to comment this. |
Beta Was this translation helpful? Give feedback.
-
Hello KaeroDot,
The same logic applies to RemindersAndre (but keep in mind that Reminders is still a work-in-progress and is even not in alpha state). The "Credentials.cpp" lines may be simply commented-out in the source code while you uncomment and put your credentials in the 2 lines above. Hope this help... P.S. Let me know if the Czech translation is OK when you have a change. |
Beta Was this translation helpful? Give feedback.
-
Hi KaeroDot, Thank you for taking the time to test the Czech language and reporting those two glitches. I'll take care of them for the next release. I'll refer to the line numbers you indicated in version 9.02 since the source code has evolved since the time of this release. |
Beta Was this translation helpful? Give feedback.
-
Hello, and thank you! I was looking for a plug in kitchen clock that wouldn't lose time like cheap analogue battery clocks do - and your firmware made the Wareshare clock about 90% cheaper than a commercial NTP clock, at least compared to what I can buy locally. The changes that I've made of any note are quite simple:
On to ideas:
For the PicoW specifically:
Again, thank you, without you I'd still be looking for a new clock. |
Beta Was this translation helpful? Give feedback.
-
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
build together 💪.
To get started, comment below with an introduction of yourself and tell us about what you do with this community.
Beta Was this translation helpful? Give feedback.
All reactions