Robin2:
but found that it doesn't like the switch being based on long strings coming thorough serial. Seems Switch can deal with bytes and integers.
SWITCH can deal with anything you throw at it. It is just another form of IF. Getting long strings through the serial connection is a little more complicated. If the strings are just for the purpose of choosing between CASE options then it makes sense to keep them short as - single characters if possible. Remember that "pleaseLetTheElephantsHaveWater" doesn't convey any more information to a computer than "E" or "W".
...R
OK, I gotcha. What I'm not certain about is how I want to send signals regarding multiple Mash states. Do I want to have a single mash state that I want to call repeatedly, with different values for Setpoint and Time? Should I create multiple mash states that each get called sequentially? Or perhaps multiple mash states that can be called (or not called) in any order. That changes how I'd want to send the signal to the program, in the first and second options I can just send "next", or more simply "n". If I want to call mash states out of sequence, then I would need to be able to say Mash1, Mash2, or at least M2. So, I've been defaulting to the longer string signal coming from serial.
Can I have multiple cases running at once in switch(case)? I don't need to have the convenience features of SM for timers, I can write a if milliseconds - targetMilliseconds(30000) for each case. Having multiple machines running at once could be very useful though.
Thanks!