Hi All
I'm just hashing out a project for a spa controller, which for the most part is coming together having just been introduced to state machine programming, and I am just thinking through how to add multiple time based events via a menu.
The spa will have two modes, Economy Mode and Comfort Mode. Economy is when the spa is generally not used such as throughout the night but also during the middle of the day and we will let the temp drop to save power, this will be the default mode
Comfort mode is the time we want the spa to be at out desired temperature ready for use and I will use a menu to be able to add, delete or edit times.
My question is it is possible to add multiple "comfort" times via a menu (using a RTC) and add to a list that expands to hold more items.
Or do you simply create a number of variables ready to take the multiple times and guess how many you will need. ie
Comfort 1 (between time X and Time Y)
Comfort 2 (between time X and Time Y)
Comfort 3 (not programmed)
Comfort 4 (not programmed)
etc
and then just add the times into those awaiting slots, this seems the simplest solution to me but was just wondering if there is a more elegant way. For example, I know a lot of dinrail mounted time clocks will have a set number of slots you can program for on/off each day.
Cheers
Al