I decided to try out the new firmware (v0.8.0-rc.8) to run a particle counter using the
opcn2 library I wrote (https://github.com/dhhagan/opcn2); while it compiles fine, it seems to prevent the Electron I am testing it on from connecting to the cell tower. I have narrowed down the issue to initiating an instance of the
OPC class as:
I really haven’t done too much research on what changed between 0.7 and 0.8, but was hoping someone with more knowledge may help debug/know where to look for errors. If I upload firmware with the OPC class initiated, it simply breathes white. If I exclude it, everything operates just fine…
My guess from glancing at the code is this:
In your constructor, you make a call to read_information_string. In that, you call delay(3).
I’m pretty sure there was a change in delay(), and calling delay during global object construction causes problems. But I can’t find the issue for it, so there is a possibility that I am imagining it.
For a quick test you could try changing it to delayMicroseconds(3000) and see if that changes the behavior.
Thanks for the suggestion - that seemed to do the trick. I also would have never caught that on my own…
Are there any notes on this anywhere? I quickly looked at the release notes for v0.8.0-rc8, but didn’t see anything.