<div dir="ltr"><div>John,</div><div><br></div>> I am not sure why you could not change a variable if it is global and done fast.<div><br></div><div>Because we have no idea what state the variables were in when the service routine was called.  Were they being inspected by main code?  Or modified?  Perhaps Garbage collection is in progress?  Without a bit of blocking code to demand a known state, we're flying blind.</div><div><br></div><div>> I may try that when I get around to the Robotics with the ESP32. That is very interesting for sure. I like the REPL concept alot.<br></div><div>Robotics are on the wish list... I just have about 3 million lines of code before I can take on another hobby.<br><br>Python is my go-to language.  Only rarely do I have to use C++ to force the solution.</div><div><br></div><div>Mike</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 26, 2021 at 2:45 PM John Vaughters via TriEmbed <<a href="mailto:triembed@triembed.org" target="_blank">triembed@triembed.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Carl,<br>
<br>
I do not NEED the delay, I just need to read the A0 at 1 ms intervals. I don't need to stop the processor for that, I need to code it responsibly if I want it to work the best way I want. I was being lazy expecting my time frame to be well within the parameters required for the desired end result. And the solution I finally did does work, but I have now been motivated to make it better.<br>
<br>
Mike,<br>
<br>
Good info thanks. I have not verified, but yes I am thinking I may have violated the watch dog. I am not sure why you could not change a variable if it is global and done fast. I also dug a little deeper and the ticker I am using is not the same that you find in Arduino. The one I am using is suggesting the flag concept as I pointed out in the first post and is working and the idea you also reinforced. I guess in general it is the simplest guarantee for accurate loop integrity. It definitely works quite well. I have looked at the micro-python. I may try that when I get around to the Robotics with the ESP32. That is very interesting for sure. I like the REPL concept alot.<br>
<br>
I can spend a little more time for a better solution. Dang it and I thought I was done with this part. `,~)<br>
<br>
Thanks,<br>
<br>
John Vaughters<br>
<br>
_______________________________________________<br>
Triangle, NC Embedded Computing mailing list<br>
<br>
To post message: <a href="mailto:TriEmbed@triembed.org" target="_blank">TriEmbed@triembed.org</a><br>
List info: <a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" rel="noreferrer" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="http://TriEmbed.org" rel="noreferrer" target="_blank">http://TriEmbed.org</a><br>
To unsubscribe, click link and send a blank message: mailto:<a href="mailto:unsubscribe-TriEmbed@bitser.net" target="_blank">unsubscribe-TriEmbed@bitser.net</a>?subject=unsubscribe<br>
<br>
</blockquote></div>