pimoroni / EnviroPlus-FeatherWing

CircuitPython library for the Enviro+ FeatherWing
https://shop.pimoroni.com/products/enviro-plus-featherwing
MIT License
10 stars 11 forks source link

No long integar support on M0 feather #27

Open harleyday opened 3 years ago

harleyday commented 3 years ago

Hello. This one's on me as I'm pretty sure this is just due to my buying an M0 RFM96 feather rather than the advised M4 express feather.

I can make all of the sensors work except for the PM5003, which returns the following message when I run the examples/particulate_sensor.py

particulate-sensor.py - Continuously print all data values.
Press Ctrl+C to exit!

Traceback (most recent call last):
  File "code.py", line 15, in <module>
  File "code.py", line 11, in <module>
  File "lib/pimoroni_pms5003/__init__.py", line 125, in read
NotImplementedError: No long integer support

May I ask two favours as I'm fairly new to coding microcontrollers:

  1. I'm assuming this means that the M0 chip just can't handle long integar numbers due to it's small size. Is this about right? Is there some work-around I could make or do I just need a different feather? My only intention in this project is to broadcast the PM readings over LoRa, so I don't think I'll need to do any on-device processing as such.
  2. May I ask that you add an extra warning to the README, stating that the PM sensor won't work for an M0-based feather? Currently it just says M4 is "recommended".

Best wishes, Harley

harleyday commented 3 years ago

Additional context for my issue: Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit Feather M0 RFM9x with samd21g18

Hope this helps!

harleyday commented 3 years ago

Quick update on this. I managed to get the M0 feather off my board (cursing my shortsightedness not to have tested it with some stacking headers), and am now using an M4 board, which works perfectly. The moral of the story - do your research before you get out the soldering iron!