Announcement

Collapse
No announcement yet.

Default Settings w/Manual Switching

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Default Settings w/Manual Switching

    Hey guys,

    Been awhile since Ive been on but have been slowly working my way back into things I was working on back in 2020.

    Been spending a ton of time learning some coding and working on some test codes for an old project and have a couple questions.

    Since this project had a switchable GB/Autotrack that is manually switched on or off with a spst switch on the interface but all of the rest of the backend is controlled by the pic, if I have auto default settings at turn on is it going to screw up the code processing if the spst switch is left in the opposite condition ?

    If switch is in the ON position its in auto gb w/interface LED, when off its in manual w/pot adjust.

    At the moment I have it set to auto on power up but thinking this morning that it probably needs the switch changed to momentary and handled in the code as well although I would rather have an spst switch on the control panel interface. Maybe do a switch read at start up and set based on condition?

    Any suggestions or ideas that I can contemplate or implement?

    Thanks guys.

  • #2
    I would either use a 2-way momentary switch, or read the switch on start-up and set the mode to match the switch.

    Comment


    • #3
      Originally posted by Carl-NC View Post
      I would either use a 2-way momentary switch, or read the switch on start-up and set the mode to match the switch.
      Hi Carl,

      Thank you for the response. That is what I have been thinking today as the best option, keep the manual spst switch and use a switch read at startup. Use eeprom to store previous gb settings and do a switch read override so it will always take precedence after a shutdown.

      Comment

      Working...
      X