2025-03-14 1:37 AM
Hi, I'm trying to implement a DHT22 humidity/temperature sensor in the Lorawan stack. The stack works fine, as does the sensor, but separately. When I try to combine them so that each time I send the data, the sensor reads it, they don't work.
2025-03-14 4:07 AM
2025-03-14 4:21 AM
@dvid wrote:Hi, before posting, I tried to investigate where the problem might be
Remember - we don't know that!
So tell us what you did.
What did you find?
Again:
Do you have teachers/supervisors/colleagues locally to help you?
2025-03-14 4:24 AM
2025-03-14 4:37 AM - edited 2025-03-14 5:04 AM
@dvid wrote:
- Im getting the right thing - but it's not getting through to LoRa
This is a very basic information. You need to set breakpoints, check the variables content.. compare NOT working to the working scenario. As said before you need to debug that yourself as you have a very specific case. Check your software/HW conflitcs.
Did you develop your DHT22 lib yourself? or you fond it on the internet and integrate it without any content analysis?
2025-03-14 4:46 AM
@dvid wrote:
- Im getting the right thing - but it's not getting through to LoRa
OK - so that's a start.
But it does contradict what you said earlier:
@dvid wrote:However, when I try to pass that programming to the Lora_app.c file to read the sensor solely from the send_data function, the sensor doesn't respond.
So you are now certain that the sensor read is working, and you are getting correct data into your code - yes?
So you need to investigate why it's "not getting through to LoRa".
2025-03-14 4:51 AM
@dvid wrote:read the sensor solely from the send_data function
That's probably not a good idea.
It's generally better to keep things isolated - keeping low coupling.
So keep you sensor reading separate for the LoRa sending.
Have your sensor code read into a variable, or "buffer" - and your LoRa code read from that buffer.