matthias-bs / loraE22

A MicroPython class for the Ebyte E22 Series LoRa modules
GNU General Public License v3.0
10 stars 3 forks source link

Raspberry Pi Pico (RP2040) interoperability #1

Closed Bikeman closed 2 years ago

Bikeman commented 2 years ago

If this repo is still under active development, I'd like to contribute some changes I made to the code to get it going on a SB-Components Pico LoRa Expansion board under the control of a Pico µC.

1) The machine.UART class for the RP2040 port seems to lack an init method at the time of writing, you have to hand over all the parameters to the constructor already. No big deal

2) The canonical UART to use on the Pico would have id=0 , but the lib only supports "1" or "2" ? Why not support, say "U0" thru "U9"

I think I found some other bugs that are not related to the Pico and I would open separate issues/pull requests for them if anyone is interested, otherwise I'll just put them in my fork.

Apart from bugs I'd also suggest some new features, e.g. configurable TX-power. Picking the max power supported by the module by model designation might not work well in regions with restrictive regulations (e.g. tx power <= 25mW in most of Europe for the 868ish MHz band)...but again, that's another issue.

(THX for this great work btw, very useful indeed)

matthias-bs commented 2 years ago

You are welcome to add you contributions and fixes to the repository!