[TriEmbed] ESP8266 Programming tip

Michael Monaghan mike at chipworks.net
Tue Jan 26 14:38:59 CST 2021


John,

> I am not sure why you could not change a variable if it is global and
done fast.

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.

> 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.
Robotics are on the wish list... I just have about 3 million lines of code
before I can take on another hobby.

Python is my go-to language.  Only rarely do I have to use C++ to force the
solution.

Mike

On Tue, Jan 26, 2021 at 2:45 PM John Vaughters via TriEmbed <
triembed at triembed.org> wrote:

> Carl,
>
> 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.
>
> Mike,
>
> 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.
>
> I can spend a little more time for a better solution. Dang it and I
> thought I was done with this part. `,~)
>
> Thanks,
>
> John Vaughters
>
> _______________________________________________
> Triangle, NC Embedded Computing mailing list
>
> To post message: TriEmbed at triembed.org
> List info: http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org
> To unsubscribe, click link and send a blank message: mailto:
> unsubscribe-TriEmbed at bitser.net?subject=unsubscribe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20210126/456e4bb7/attachment.htm>


More information about the TriEmbed mailing list