Is it possible to use the same variable in more than 1 script?
I suppose if the answer is no, the question I'll be asked is why I want to do that... Here's an example, maybe someone can suggest strategies to deal with this:
I wanted to have a separate script that continuously monitors the volume in my BK and disables the heating element when the volume is lower than a minimum value. This has to be a separate script to ensures it is working all the time. I would prefer not to hard code this minimum value and have it as a variable/parameter that I can set.
I also want this value in my main brew script, because I want to start heating the boil during sparge as soon as this minimum volume is set. Again, it could be hard coded... but it really should be the same value in both scripts... it would be nice to have a single variable that can be used by both scripts.
Hope this helps.
Correct - v1.0 cannot currently pass variables across scripts. You can combine scripts into one, and allow multiple loops to run in "real time" to have access to the variables, or sit tight for v1.1, which we will release in a beta to licensed users soon. v1.1 will have global variables.
I can see how one could combine loops into one (but that seems like a lot of work). I don't understand how one would allow multiple loops to run at the same time in a single script... Can you show me an example?
Simply stated, don’t use ‘wait’ statements. Use ‘if’ checks so that continuous evaluations occur. That make sense?
I'm not following...