Closed kevinjwalters closed 2 years ago
@dglaude This looks good if you wish to test on your FeatherS2 setup with Enviro+ FeatherWing and PMS5003. This goes with the standard Pimoroni setup described in https://www.instructables.com/Using-the-Pimoroni-Enviro-FeatherWing-With-the-Ada/ and https://github.com/pimoroni/pms5003-circuitpython/pull/8
@Gadgetoid This together with https://github.com/pimoroni/pms5003-circuitpython/pull/8 makes the Enviro+ FeatherWing more robust and more memory efficient, let me know what you think.
If/when this is all applied it would be great to get a refresh of submodules and a new release for this.
I've half broken the page turning for plotters_combined
when interval isn't 1 second. I'll fix this up in a day or two. FIXED with https://github.com/pimoroni/EnviroPlus-FeatherWing/pull/24/commits/0c2cf96455fc9a396bd7e444d476503bfd2230c6
I've effectively tested this on 6.2.0 too while developing support for SCD-30 CO2 sensor.
@Gadgetoid If you've got the FeatherWing out you might want to review the four outstanding (in every respect) PRs for this repo.
Of course I attempted to merge the other, smaller PRs and made a total hash of things- conflicting this PR.
Sorry for the lack of response here, I've been totally overwhelmed with a mixture of life and the million other things vying for my attention.
I think I've got an EnviroPlus FeatherWing that survived my move down-south somewhere, but your incredible level of diligence here makes me extremely tempted just to merge :smile: (I don't have more than one Feather board to test with at the moment :grimacing:)
I did a lot of testing but it's always possible to miss something. That was all pre CircuitPython 7 and only on Feather nRF52840. Worth giving it all a go on an M4 board with CPy 7.
Okay, merge conflict fixed!
I say we do or die with this :rocket:
Oh and- thank you, very much! This project is a little bit on the fringe of my knowledge so it's difficult to keep things tip top, though I'm slowly starting to work more generally with CircuitPython.
The
plotters_combined
example dies with aMemoryError
on a Feather nRF52840 Express with a PMS5003 attached to an Enviro+ FeatherWing. These changes address this.width=None, height=None, extra_data=16, auto_show=True, auto_discard=True
#19 #23extra_data
is how many data_points are stored beyond those on the screen for efficient redrawing and allowing user program to jump scroll if desired.auto_show
allows the display.show to be disabled to allow a program more control and efficient use viaobject.group
auto_discard
determines what happens if more data_points are added thanextra_data
without callingdraw()
- aFalse
value will raise an exception.fill()
introduced in CircuitPython 5.3.0 #23plotter_test.py
to aid testing with visual verification and checking performanceTested with
plotters_combined.py
andplotter_test.py
on Feather nRF52840 Express with6.0.0
.plotters_combined
runs fine with PMS5003 inpassive
mode for at least 12.5hrs atinterval = 0.2
(code floors at 1s) based on testing. It starts around 53k free memory and stays constant at 30k once it starts scrolling.plotters_combined
runs fine with PMS5003 inactive
mode for at least 5hrs, rest is same as above.No dependency on #21 but that could be reviewed at same time as this and applied beforehand.