time and date code

More
1 year 4 months ago #9608 by Karel
time and date code was created by Karel
I want to make a clock using two drivers 6 digits for the hour and 6 for the date. The hour is no problem thanks to Ian , but I just need the revers for the date , So about 55 seconds date and and 3 seconds time and scramble , What part of the code must be changed ?

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #9613 by Ian
Replied by Ian on topic time and date code
I think the bit you might be looking for is this:
Transition transition(500, 1000, 3000);

which is defined as:
Transition::Transition(int effectInDuration, int effectOutDuration, int holdDuration)

which allows you to set the durations of the stages of the effect, and this:
if (slotsMode > SLOTS_MODE_MIN) {
              if (second() == 50) {

                // initialise the slots values
                loadNumberArrayDate();
                transition.setAlternateValues();
                loadNumberArrayTime();
                transition.setRegularValues();
                allFadeOrNormal(DO_NOT_APPLY_LEAD_0_BLANK);

                transition.start(nowMillis);
              }

which says "if we have slots mode defined AND the time is 50 seconds THEN start the transition display".

Does that answer the question?

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #9614 by Karel
Replied by Karel on topic time and date code
Not sure, I need to have the date displayed as standard and the time for a few seconds on the count of 50 seconds and have both display scramble at the same time

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #9615 by Ian
Replied by Ian on topic time and date code
Ah, I see, so you want to to have two units side by side doing the opposite of each other.

Ok, there are two parts to the story, and easy one and a hard one:

1) Easy one: make the "date clock" show the date instead of the time. That's can be done by replacing all instances of "loadNumberArrayTime" with "loadNumberArrayDate" and vice-versa

2) Now the hard part: synchronising the display changes: I think it will be super annoying if the two displays are even a little out of sync. For this I think it will be necessary to use something like I2C to set the date clock into a slave mode and have the master send time updates to it, including milliseconds. This is not such an easy thing to do. Another alternative might be to the the RTC's square wave output. Perhaps there are other ideas?

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #9677 by Karel
Replied by Karel on topic time and date code
Hi
I used the easy way and it works fine, with two pcb's and two esp's they stay in sync just great. There is a slight offset sometimes, but hey it's a nixie clock, bit nasty, how your doing, retro tech.

Please Log in or Create an account to join the conversation.

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.176 seconds

Search

Tube Suppliers

Go to top
JSN Boot template designed by JoomlaShine.com