I’m wanting to set up my Enviro Urban so it acquires when manually told to do so, through a button press. I was under the impression that the POKE button did exactly this, however, when I press mine it does nothing - I’ve tried holding it for a few seconds and there’s still no light appearing. I’m powering via the micro-USB port.
Are there any issues with what I’m trying to do or how I’m doing it? Does using the USB port for power mean I can’t manually operate the instrument like this? If so that seems like quite a big restriction - using large power bank direct to micro-USB is a easy way to give the instrument power for extended periods of time.
Thanks for such a quick response. It actually looks like my main.py script (as it shipped) has some other errors that it didn’t previously hit - I’m running it now without my wifi being accesible and it’s hitting NameError: name 'warn_led' isn't defined. It looks like there’s quite a few missing definitions in main.py, so I probably need to sort these imports out and perhaps then it will POKE as expected. I’m guessing these should all be visible through the init.py but for some reason running code in Thonny is throwing these errors.
Possible that the Enviro is not pulling enough current for your power bank to turn on automatically, perhaps?
This is plugged into a computer USB port so should be supplying power, and the automatic off/on sequnces work so I wouldn’t have thought this is an issue?
When I start the code from Thonny it says this at the end:
2000-01-01 00:33:15 [debug / 115840] - on usb power (so can't shutdown) halt and reset instead
2000-01-01 00:34:00 [debug / 114048] - hard reset
then
PROBLEM IN THONNY'S BACK-END: Exception while handling 'Run' (ConnectionError: EOF).
See Thonny's backend.log for more info.
You may need to press "Stop/Restart" or hard-reset your MicroPython device and try again.
Process ended with exit code 1.
I’m guessing the latter is when the instrument goes into sleep mode?
Whenever the main LED is off I can’t get it turn to turn back on with the POKE - it just turns back on every minute as I’ve requested it to.
Everything else seems to be working as expected, so I would be interested to know if anyone can successfully POKE their board when powered via the micro-USB? Do I have a dodgy board or is something else going on…
I guess I’ll buy a JST cable and try powering via that.
Using the POKE button alongside the RESET does make the board enter provisioning, so I’m assuming the POKE button does work.
Ok I’ve tested with powering through the JST and the POKE function works as expected. So it seems that the board can’t be poked when powered via the USB port. Why is this the case? Are the developers aware of this? It seems odd (and quite frustrating) to not have full functionality throught the USB port… I think this should at least be made more clear in documentation somewhere.