Why does serial.read stop working?

pylon:

Then he should have said "hey dummy, I don't know about that library and you didn't provide a link for me to learn more".
And I would've said "D'oh! You're right!".

I agree.

Instead, he complained about my formatting, which isn't helpful. In fact, it probably wasted everyone's time while I went off and checked my \t in the file. If the bar for getting help on this forum is that we have perfectly formatted code that complies to convention perfectly, then nobody will be able to get help on this forum and nobody who's on the forum will actually need the help.

Sometimes I see horribly formatted code which misleads the interpretation, then I also complain about the formatting. Although your code is not an example of how one should format code, it's readable doesn't mislead in my opinion, so I agree also that PaulS' complains were a bit "picky". Nevertheless, if you read the sticky post at the top of the forum you would have linked the library in your first post and Paul could have seen that it's more or less the library example. If he then would have written the same post, it would have been a complete overreaction.

Back to your problem to calm down.

You didn't understand the state machine concept (at least not the own of that library). EXEC() does run one loop of the state machine. In your loop your calling state machine Hold0 and in that body function you finish the state machine. From that moment EXEC(Hold0) will return immediately and you end in an endless loop, doing nothing.

Thanks, now that I'm not feeling quite so cranky ....
I understand from your post that my state machine Hold0 is in a loop in loop() so serial.available() is able to keep being .... available... Probably what I need to do then is move EXEC(Hold0) out of the loop() and into setup(), but give it its own loop to read characters. What is the best way to do that? giving it a loop to allow reading multiple characters from serial?

zoomkat:

Basically, don't be Nick Burns, the company computer guy:

Well, you started out with some "state machine" mumbo jumbo instead of stating specifically what you want the arduino to do in your project. Probably best to start back with the basics of what you want to do. That being said, there are members of the forum that in my opinion have personality issues that become apparent in the way they think they are being "helpful". Anyhow there have been previous brewing projects discussed in the past and studying those previous post may provide some useful information.

brew site:http://forum.arduino.cc/index - Google Search

Zoomkat, I posted another thread in the Project Guidance forum (which you posted on B)
http://forum.arduino.cc/index.php?topic=229539.msg1657014#msg1657014
I didn't want to double post though, since I thought this was a relatively small issue. Now that I see what the problem was (not that serial just wasn't reading, but that the while loop went by impossibly fast), I see that it's a larger issue with using State Machines and my implementation particularly.

I've looked at the code for BrewTroller and HABS, but both are using if statements. So.Many. Ifs. I'm trying to avoid that, and I'm also trying to create a program that allows for multiple mashes to create a mash profile that isn't a single mash time/mash temp.

Thanks,
JR