vasques666

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts

  • vasques666
    Participant

    you need to change the firmware, there is no other option (

    • This reply was modified 3 years, 1 month ago by  vasques666.
    in reply to: Turn tubes off at night #39012

    vasques666
    Participant

    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.
    in reply to: Turn tubes off at night #39008

    vasques666
    Participant

    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.
    in reply to: Turn tubes off at night #39002

    vasques666
    Participant

    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.
    in reply to: Turn tubes off at night #39000

    vasques666
    Participant
    in reply to: Turn tubes off at night #38997

    vasques666
    Participant

    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.
    in reply to: Turn tubes off at night #38996

    vasques666
    Participant

    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 modify

    String 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


    vasques666
    Participant

    you need to change function modesChanger(), just leave menuPosition = TimeIndex; instead of selector

    in reply to: Turn tubes off at night #38980

    vasques666
    Participant

    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.
    in reply to: Turn tubes off at night #35130

    vasques666
    Participant

    I added digital light sensor to clock

    in reply to: Turn tubes off at night #35100

    vasques666
    Participant

    I just turned it off in firmware by commenting all lines, containing word “song” (I just hate the way it sound)

    in reply to: Turn tubes off at night #34006

    vasques666
    Participant

    finished crossfade for digits, now it flickers only on video, but in real life it’s smooth

    in reply to: Turn tubes off at night #34003

    vasques666
    Participant

    now I’m trying to add smooth digits switch (fade-in)

    in reply to: Turn tubes off at night #34002

    vasques666
    Participant

    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)

    in reply to: Turn tubes off at night #33998

    vasques666
    Participant

    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);

Viewing 15 posts - 1 through 15 (of 15 total)