vasques666
Forum Replies Created
-
AuthorPosts
-
12.11.2021 at 16:47 in reply to: Can it be set up to only show the TIME and not toggle between DATE and TIME? #39844
you need to change the firmware, there is no other option (
- This reply was modified 3 years, 1 month ago by vasques666.
that’s strange, I just replaced one string.
Now I get my firmware with dim sensor and changed it to work with hour limits.
there are no errors when I compile it
Please try it- This reply was modified 3 years, 3 months ago by vasques666.
- This reply was modified 3 years, 3 months ago by vasques666.
Sorry. my bad, I reuploaded firmware without sensor. Please, download it again )
link is still same- This reply was modified 3 years, 3 months ago by vasques666.
oh, I forgot, that in this firmware I added lighting sensor to dim tubes, if you need firmware without it, here it is
- This reply was modified 3 years, 3 months ago by vasques666.
- This reply was modified 3 years, 3 months ago by vasques666.
- This reply was modified 3 years, 3 months ago by vasques666.
This is modded firmware with 12h format, Month/Day/Year date and no temperature sensor
- This reply was modified 3 years, 3 months ago by vasques666.
Just remember, in setup mode you need to set date by Day/Month/Year format (I don’t want to mess with settings right now) 😉
To use 12h format you need to change
String updateDisplayString() { static int prevS=-1; prevstringToDisplay = PreZero(hour()) + PreZero(minute()) + PreZero(second()-1); if (second()!=prevS) { prevS=second(); return getTimeNow(); } else return stringToDisplay; }
to
String updateDisplayString() { static int prevS=-1; prevstringToDisplay = PreZero(hourFormat12()) + PreZero(minute()) + PreZero(second()-1); if (second()!=prevS) { prevS=second(); return getTimeNow(); } else return stringToDisplay; }
- This reply was modified 3 years, 3 months ago by vasques666.
- This reply was modified 3 years, 3 months ago by vasques666.
As far as I can understand, you are using AM PM time format and I use 24h format, so I’ll look forward to modify firmware for you.
Date format is set by
if (menuPosition == DateIndex) stringToDisplay = antiPoisoning2(getTimeNow(), PreZero(day()) + PreZero(month()) + PreZero(year() % 1000) );
so you need to modify it to
if (menuPosition == DateIndex) stringToDisplay = antiPoisoning2(getTimeNow(), PreZero(month()) + PreZero(day()) + PreZero(year() % 1000) );
and modifyString updateDateString() { // static unsigned long lastTimeDateUpdate = millis(); static unsigned long lastTimeDateUpdate = millis()+1001; static String DateString = PreZero(day()) + PreZero(month()) + PreZero(year() % 1000); if ((millis() - lastTimeDateUpdate) > 1000) { lastTimeDateUpdate = millis(); #ifdef tubes8 DateString = PreZero(day()) + PreZero(month()) + year(); #endif #ifdef tubes6 DateString = PreZero(day()) + PreZero(month()) + PreZero(year() % 1000); #endif } return DateString;
to
String updateDateString() { // static unsigned long lastTimeDateUpdate = millis(); static unsigned long lastTimeDateUpdate = millis()+1001; static String DateString = PreZero(month()) + PreZero(day()) + PreZero(year() % 1000); if ((millis() - lastTimeDateUpdate) > 1000) { lastTimeDateUpdate = millis(); #ifdef tubes8 DateString = PreZero(month()) + PreZero(day()) + year(); #endif #ifdef tubes6 DateString = PreZero(month()) + PreZero(day()) + PreZero(year() % 1000); #endif } return DateString;
please write back with results
15.09.2021 at 20:28 in reply to: Can it be set up to only show the TIME and not toggle between DATE and TIME? #38986you need to change function modesChanger(), just leave menuPosition = TimeIndex; instead of selector
Hi, gg!
Sorry for late answer, if you want to disable temperature indication, you need to change function modesChanger() from{ if (editMode == true) return; if (value[ModeChangeInIndex] == 0) return; static unsigned long lastTimeModeChanged = millis(); static unsigned long lastTimeAntiPoisoningIterate = millis(); static int transnumber = 0; if (((millis() - lastTimeModeChanged) > modesChangePeriod) && (second() >= 30)) { lastTimeModeChanged = millis(); if (transnumber == 0) { menuPosition = DateIndex; modesChangePeriod = value[ModeChangeOutIndex] * 1000; } if (transnumber == 1) { menuPosition = TemperatureIndex; modesChangePeriod = value[ModeChangeOutIndex] * 1000; } if (transnumber == 2) { menuPosition = TimeIndex; modesChangePeriod = value[ModeChangeInIndex] * 40000; } transnumber++; if (transnumber > 2) transnumber = 0; if (modeChangedByUser == true) { menuPosition = TimeIndex; } modeChangedByUser = false; } if (((millis() - lastTimeModeChanged) < 1000) || (second() == 0)) { if ((millis() - lastTimeAntiPoisoningIterate) > 50) { lastTimeAntiPoisoningIterate = millis(); if (menuPosition == TimeIndex) stringToDisplay = antiPoisoning2(updateTemperatureString(getTemperature(value[DegreesFormatIndex])), getTimeNow()); if (menuPosition == DateIndex) stringToDisplay = antiPoisoning2(getTimeNow(), PreZero(day()) + PreZero(month()) + PreZero(year() % 1000) ); if (menuPosition == TemperatureIndex) stringToDisplay = antiPoisoning2(PreZero(day()) + PreZero(month()) + PreZero(year() % 1000), updateTemperatureString(getTemperature(value[DegreesFormatIndex]))); // Serial.println("StrTDInToModeChng="+stringToDisplay); } } else { transactionInProgress = false; } }
to
{ if (editMode == true) return; if (value[ModeChangeInIndex] == 0) return; static unsigned long lastTimeModeChanged = millis(); static unsigned long lastTimeAntiPoisoningIterate = millis(); static int transnumber = 0; if (((millis() - lastTimeModeChanged) > modesChangePeriod) && (second() >= 30)) { lastTimeModeChanged = millis(); if (transnumber == 0) { menuPosition = DateIndex; modesChangePeriod = value[ModeChangeOutIndex] * 1000; } // if (transnumber == 1) { // menuPosition = TemperatureIndex; // modesChangePeriod = value[ModeChangeOutIndex] * 1000; // } if (transnumber == 1) { menuPosition = TimeIndex; modesChangePeriod = value[ModeChangeInIndex] * 40000; } transnumber++; if (transnumber > 1) transnumber = 0; if (modeChangedByUser == true) { menuPosition = TimeIndex; } modeChangedByUser = false; } if (((millis() - lastTimeModeChanged) < 1000) || (second() == 0)) { if ((millis() - lastTimeAntiPoisoningIterate) > 50) { lastTimeAntiPoisoningIterate = millis(); if (menuPosition == TimeIndex) stringToDisplay = antiPoisoning2(PreZero(day()) + PreZero(month()) + PreZero(year() % 1000), getTimeNow()); if (menuPosition == DateIndex) stringToDisplay = antiPoisoning2(getTimeNow(), PreZero(day()) + PreZero(month()) + PreZero(year() % 1000) ); } } else { transactionInProgress = false; } }
- This reply was modified 3 years, 3 months ago by vasques666.
I added digital light sensor to clock
I just turned it off in firmware by commenting all lines, containing word “song” (I just hate the way it sound)
finished crossfade for digits, now it flickers only on video, but in real life it’s smooth
now I’m trying to add smooth digits switch (fade-in)
I just slightly modded firmware for NCM107&NCT3XX to include latest updates (temperature sensor at most) and to show date+temperature every minute at 30 sec + antipoisoning at 00 sec. Also I added night dim feature from 21 to 8 hours.
https://www.youtube.com/watch?v=LHEG2BAZatY – normal operation with modded firmware (added white colour to LED palette)
I did something like that, but I didn’t completely turn off tubes, I just dimmed them.
I’d just edit firmware doIndicationXXX.ino (your board) to check current hour and if it >21 and <8 just not do “digitalWrite(LEpin, HIGH);”
after this section:SPI.transfer(Var32>>24);
SPI.transfer(Var32>>16);
SPI.transfer(Var32>>8);
SPI.transfer(Var32); -
AuthorPosts