How can I achieve reliable data transfer over LoRa using MicroPython on Pycom GPy?
@Middleware & OS
I'm developing a smart agriculture system using a
I've written the following code to initialize the soil moisture sensor and set up
I have verified the sensor connection and checked the pin configuration, ensured that the
How can I resolve these issues to successfully read data from the soil moisture sensor and transmit it via LoRa using MicroPython on the Pycom GPy? Please provide any necessary configuration changes or code corrections.
Here's my code
I'm developing a smart agriculture system using a
Pycom GPy, which features an ESP32 microcontroller with LTE and LoRa capabilities. The system is running MicroPython, and I'm using a soil moisture sensor to monitor soil conditions. My goal is to read soil moisture data and send it over LoRa to a remote gateway.I've written the following code to initialize the soil moisture sensor and set up
LoRa communication, but I'm encountering errors, I'm unable to get valid readings from the soil moisture sensor, and the LoRa transmission does not seem to be working. ValueError: invalid pin for ADCNot joined yet...I have verified the sensor connection and checked the pin configuration, ensured that the
LoRa credentials (DevEUI, AppEUI, AppKey) are correct and match those provided by the network, cross checked the LoRaWAN regional settings and ensured the frequency is set correctly, verified the LoRa antenna is properly connected. But still getting the errors.How can I resolve these issues to successfully read data from the soil moisture sensor and transmit it via LoRa using MicroPython on the Pycom GPy? Please provide any necessary configuration changes or code corrections.
Here's my code
Solution
Hello guys, after a while of debugging and checking through I was able to fix the
This is My. Code
ValueError: invalid pin for ADC on my code, it turns out I was required to use p15 intead of p13 and for the Not joined yet... error it was due to tge mistake I made in imputing my Appkey which i have corrected now.This is My. Code