effevee / loraE32

A MicroPython class for the Ebyte E32 Series LoRa modules
GNU General Public License v3.0
35 stars 6 forks source link

Using on Rpi pico #4

Open kaankaval opened 2 years ago

kaankaval commented 2 years ago

Can i use this library on pico? I'm trying change the values of the library variables like uart ports. Unfortunately i failed about custimize this lib.

effevee commented 2 years ago

I didn't test this on the raspberry pi pico. It should be perfectly possible. Have you checked the pico micropython documentation ?

kaankaval commented 2 years ago

No. I'll check it now.

kaankaval commented 2 years ago

20220124_182651.jpg

On one hand trying to control manually. Btw your lib should work perfectly on theory. Would you try it on Pico?

effevee commented 2 years ago

you should never use the lora module without antenna or you will damage it.

Please post your modified code you have so far. I will have a look at it if I have some time

varna9000 commented 2 years ago

It's just the pins, which have to be defined in the UART instance (e.g. tx=4,rx=5) and lib works pretty well on Pico. I've got a weather station sending data every 10 min with your lib and a pico. I've also made modification so it works on regular python on RPI. I'm planning to tidy all up and send you a PR at some point.

effevee commented 2 years ago

It's just the pins, which have to be defined in the UART instance (e.g. tx=4,rx=5) and lib works pretty well on Pico. I've got a weather station sending data every 10 min with your lib and a pico. I've also made modification so it works on regular python on RPI. I'm planning to tidy all up and send you a PR at some point.

Looking forward to your modifications :-)

varna9000 commented 1 year ago

It's been a while :) I've made a multi-python branch of the library, which supports also esp8266, Raspberry Pi Pico and Raspberry Pi. Few days ago, I've added partial support for e32-DTU (outside mounting variant of e32-868). DTU has physical switches for m0 and m1, so I had to ignore these in the code for DTU. Config and Version functions are unusable, unless you physically change the dip switch positions. However sending and receiving for DTU works with the current functions (which is enough for me).

Added two new parameters to the constructor: platform and DTU

I'm still cleaning some bugs, but it's usable with all mentioned platforms. I've added plenty of comments on my modifications in the code.