then when I put some similar code into my program it was showing voltage level on USB and about 0.1V (clearly wrong for my 3 alkaline) on battery power. Probably my error.
Sounds like you weren’t pulling GP25 high? I got those sort of readings before I figured out you needed to do that on a Pico W.
If you are doing this in your code bear in mind that pulling this pin high this might interfere with doing things with wireless - GP25 is also the wireless interface’s SPI pin (though I haven’t noticed any problems reading the battery and posting data via wireless on Enviro).
My Inky Frame does not appear to ever run the MicroPython code when I power it on. After powering it on the reset button also does nothing. This is for code which isn’t using the rtc timer. I think that can confuse the situation at times. It does wake up on button presses but these need to be fairly long presses for it to wake up. I think that’s a little confusing from a user interface point of view.
This is correct, you will always need to press a button (or use the RTC/external trigger) to wake it up when running on battery, whether or not you press reset. I found it useful to think of the battery behaviour as ‘off by default’ - you need to hit a wake up trigger/tell the board to stay awake, otherwise it will turn itself off to save battery.
Is that confirming the behaviour I observe? I do not have to press reset at all. If I power it on and then press button B for about 1.5 seconds my MicroPython code runs.
Yep, you don’t have to press reset, under most circumstances a button press will wake it up on its own. I found reset to be occasionally useful when Inky Frame got itself into a confused state when I ran broken code on it and I needed to interrupt it :)
Is that delay really related to MicroPython start-up time? Does that imply a compiled C++ program can behave differently?
Yes, I believe so. I think our software folks have recently merged some super early wake up stuff for the Badger and Enviro builds, so hopefully we’ll be able to roll that out to Inky Frame and make things a bit more snappy.
Are there any plans for a MicroPython library like the C++ InkyFrame class to make all this easier?
Not sure, probably best to pop in a feature request/ issue on Github if this would be useful to you?
For the RTC timer, how accurate is the clock likely to be?
I can’t see an accuracy figure based on a quick scan through the datasheet (it’s here if you fancy some light reading), but it seems pretty accurate so far, the frequency of my Enviro readings seems accurate to the second…
Is there documentation on how the external trigger works? Is it 5V safe?
You need to transition the external trigger to high to trigger a wake up. It’s 3.3V max.
Hope that helps!