Closed wildestpixel closed 1 year ago
I have been having the exact same issue. I have been looking into a lot of documentation in between my jobs and school, and I think I have found in the readme for this repo a vague solution. There is a small section mentioning the screen module and how to initialize a screen object to display the plotter graphs. What we have to do it initialize the screen with the 'spi' argument included when we create the screen object. The issue is because the airlift and the enviroplus both use the SPI bus, and we need to explicitly state that they need to be sharing the bus together. I'm gonna do some coding tomorrow when I have the time, and figure out how to go about setting the airlift as the master and enviro as slave spi, or vice versa. Maybe you'll beat me to it, but that's what we need to do!
I've returned the Enviroplus feathewring to Pimoroni and interfaced the PMS5003 directly via an ESP8266 (making my airlift redundant) and got my readings up on ThinkSpeak and charted back into my website or downloadable as csv.
The connection at D11 / port pin 21 is pretty hard in the .mpy side of things - if airlift is using D11 and PMS5003 from Pimoroni is using D11 your only hack is to solder esp_busy to another pin and address that in Circuitpython.
The only thing I've missed from the Enviroplus featherwing is the gas sensor as I have mems and bme280 elsewhere.
The fact that unlike adafruits circuitpython libraries, this one seems to be a one touch and like it or lump it means that I've learned to be very careful of where I'm buying things from. Some vendors maintain their libraries with customers in mind, others post a solution that seems to work at launch and don't address user feedback.
That's a bummer. I started noticing the more proprietary-ish nature of the code as I've been digging through it. I was hoping it would've been more straightforward to address through circuitpython like alot of other adafruit feathers are able to do. I like having the display locally and still be able to log/view my IO dashboard when I leave and was hoping to accomplish that with this. I also have an enviro plus for my pi zero w that I really like the color display with images on it. I started trying to do the same thing with it and incorporate it with AIO but haven't been able to yet. I've tried using a couple different means of threading to run the data sync in parallel but the screen never finishes initializing and it always hangs. Not sure if I can find a different solution for it or not but I'd like to think there's a way to do it. I would've thought enough people would want to use MQTT with these products enough to where they would have dedicated modules or walkthroughs but I haven't really seen anything "official".
I think because it replicates the all-singin' all-dancing Enviro+, it uses pretty much all the pins. There is one potential pin spare, but even if a pin did move, there would be overlap with the ESP32 support pins on D13 through D10, and it also has the same problem the Ultimate GPS Fwing has: Can't use it with UART-occupying Feathers like the 8266 and nRF52 https://www.adafruit.com/product/3133
Architecture-wise, Phil has strong feelings about being as Pythonic as possible, which he will have passed to Nat when developing our first Featherwing, but hopefully feedback from people using Feather day to day will help bring him around to something more embedded friendly.
Also I forgot to mention that I have gotten the enviroplus featherwing to work with sending live feeds to my io dashboard. I don't use the MQTT client, I use HTTP. It all works great with the M4 Express, the only thing I hadn't gotten to work at the same time is the plotter displays on-screen.
I have not tested with my AirLift FeatherWing (that I need to locate, it is at home... but where?).
I suggest the following hardware setup: EnviroPlus + nRF52840 + Raspberry Pi (with BT) And on the software side use BroadcastNet library: https://github.com/adafruit/Adafruit_CircuitPython_BLE_BroadcastNet
For explanation on how to use that lib, you can folow this: https://learn.adafruit.com/bluetooth-le-broadcastnet-sensor-node-raspberry-pi-wifi-bridge
When time permit, I will investigate further and maybe document this and share the code.
@dglaude I definitely looked into what you mentioned and have been tinkering around with a new nRF52840 Sense Feather that I just snagged the other day. Quite an impressive and chock full little piece of kit! Can't believe I hadn't noticed it until now!
@wildestpixel this post is for you though my dude. I know there has been some issues with the D11 pin conflict and mentions of returned enviro-feathers, but I love these little guys too much to give up! Haha...anyways, I made a pull request for the main Enviro+ Python repo and included a script based off an Adafruit example using one of their sensor boards, that I was able to get to work with my enviro-pi to send live sensor data to AIO while still running the cool little weather-and-light display.
It's late and I've had a long ass night at work but had to give my featherwing a little attention before bed, and so far I have managed to initialize the screen, display the REPL, connect to my wifi, pull my aio feed, AND send sensor data, all in the REPL running individual lines of my code. It's only a small step for sure, but I have not had any SPI conflicts as of yet as they are still sharing the bus and working fine. Tomorrow I will see about displaying more than just the REPL and see about drawing the readings on screen while updating the feed and see where that gets me. There may be hope left after all gents!
Another quick update because my ass just couldn't wait to check it out and see!
As the pics above kind of show, I have been able to confirm a constant feed update to my adafruit io dashboard now using my new code file. I was thinking about making a pull request to include it, but right now I have only got it working with the bme280 sensor on the board. I'm working today on getting the plotters to show on screen as well, and maybe try and add the page turner for OX/CO2 and other displays.
One small step at a time, but it's working now!
It will work with anything other than PMS5003 as the conflict is board.D11, hence That pin vs esp32_ready. Getting bme280 data onto Adafruit IO isn’t the subject of this git issue or what it tries to resolve.
The esp_reset is not necessarily needed, did you try assigning that to None and using that pin for the esp_ready and let the PMS5003 use the D11? I don't have one at the moment so I can't exactly try or else I would. I just didn't notice if you had tried that or not.
As for the git issue, it's titled as 'Conflict between Enviro+ and Adafruit Airlift Featherwing - D11' which was the exact issue I was having trying to sync up with aio using my featherwing. My issue involved D11, your issue involved D11. As far as I'm concerned, we both had valid issues in regards to what your title said....bud ;)
For Wifi connectivity while using all the feature of Enviro+, I believe the ESP32S2 based Feather (like Feather S2 from unexpected maker) will make that easier as they have build-in Wifi and do not require an AirLift.
As far as I'm aware there's no action we can take here. Putting a line under this. Feel free to re-open if you feel it necessary.
On M4 feather Express, I get a REPL output of
My Circuitpython Code is :
Code to read the PMS 2.5 data alone is fine, as is my script uploading to AdafruitIO, but the complaint is about pin D11, which is ESPBUSY or esp32_ready on the airlift.