Skip to content

RFM9x -- freeze library into build #3251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 17, 2020
Merged

RFM9x -- freeze library into build #3251

merged 5 commits into from
Aug 17, 2020

Conversation

jerryneedell
Copy link
Collaborator

@jerryneedell jerryneedell commented Aug 6, 2020

This freezes adafruit_bus_device and adafruit_rfm9x into the build for the feather_m0_rfm9x.
I had to take out several modules.
At this point, pulseio is removed. It may be possible to put it back once #3236 and #3237 are implemented. Right now some of the larger translations will not build with it and it does not work on the SAMD21 anyway. We can revisit this.
The main downside to removing it is we cannot support the DHT sensors.

I waned to get this out so it can be reviewed and be available for anyone to test.

adds Adafruit_CircuitPython_RFM9x to the frozen folder

@jerryneedell jerryneedell requested a review from brentru August 6, 2020 14:13
@brentru
Copy link
Member

brentru commented Aug 10, 2020

@jerryneedell I'll be testing this today, added to TODOs

@brentru
Copy link
Member

brentru commented Aug 10, 2020

@jerryneedell Was too optimistic, will get to this tomorrow

@tannewt tannewt added this to the Long term milestone Aug 10, 2020
@brentru
Copy link
Member

brentru commented Aug 17, 2020

@jerryneedell Ok, I checked out the branch and built the uf2. Had to delete default images folder to fit the simpletest code.py for the RFM9x.

Importing adafruit_rfm9x at the REPL throws the following ImportError

Adafruit CircuitPython 6.0.0-alpha.2-295-g5cf41c0d1 on 2020-08-17; Adafruit Feather M0 RFM9x with samd21g18
>>> import adafruit_rfm9x
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'adafruit_rfm9x'

@jerryneedell
Copy link
Collaborator Author

jerryneedell commented Aug 17, 2020

@jerryneedell Ok, I checked out the branch and built the uf2. Had to delete default images folder to fit the simpletest code.py for the RFM9x.

Importing adafruit_rfm9x at the REPL throws the following ImportError

Adafruit CircuitPython 6.0.0-alpha.2-295-g5cf41c0d1 on 2020-08-17; Adafruit Feather M0 RFM9x with samd21g18
>>> import adafruit_rfm9x
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'adafruit_rfm9x'

Not sure I understand where the “images” folder came from.
I'm confused. So you can't find the library after you built it?
Are you sure you built it from the PR?

You have a different commit than I do -- see comment below.

@jerryneedell
Copy link
Collaborator Author

works for me

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.2-175-g5f60bec85 on 2020-08-17; Adafruit Feather M0 RFM9x with samd21g18
>>> 
>>> import adafruit_rfm9x
>>> 
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.



Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.2-175-g5f60bec85 on 2020-08-17; Adafruit Feather M0 RFM9x with samd21g18
>>> import rfm9x_simpletest
Sent Hello World message!
Waiting for packets...
Received nothing! Listening again...
Received nothing! Listening again...
Received nothing! Listening again...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "rfm9x_simpletest.py", line 53, in <module>
  File "adafruit_rfm9x.py", line 745, in receive
  File "adafruit_rfm9x.py", line 595, in rx_done
  File "adafruit_rfm9x.py", line 359, in _read_u8
  File "adafruit_rfm9x.py", line 351, in _read_into
  File "adafruit_bus_device/spi_device.py", line 90, in __enter__
KeyboardInterrupt: 
>>> 



@jerryneedell
Copy link
Collaborator Author

jerryneedell commented Aug 17, 2020

@brentru just tested #3237 on an rfm9x build with pulseio enabled and it can now support the DHT sensors.
perhaps we should hold off on this until #3237 is merged and I can see if I can fit pulseio back into the build.

Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works! Thanks for making room

@brentru
Copy link
Member

brentru commented Aug 17, 2020

perhaps we should hold off on this until #32327 is merged and I can see if I can fit pulseio back into the build.

@jerryneedell I don't see any learn guides/projects which utilize the DHT+LoRa RFM9x (aside from TTN ones, and those should be run on the SAMD51). Are you OK with merging this as-is, and we can create another PR to fit pulseio after?

@jerryneedell
Copy link
Collaborator Author

jerryneedell commented Aug 17, 2020

perhaps we should hold off on this until #32327 is merged and I can see if I can fit pulseio back into the build.

@jerryneedell I don't see any learn guides/projects which utilize the DHT+LoRa RFM9x (aside from TTN ones, and those should be run on the SAMD51). Are you OK with merging this as-is, and we can create another PR to fit pulseio after?

Yes -- absolutely -- go ahead -- pulseio may not fit anyway
merging it now would be my preference.

@brentru brentru merged commit b1a8fb8 into adafruit:main Aug 17, 2020
@jerryneedell jerryneedell deleted the jerryn_rfm9x branch August 18, 2020 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants