HPD13A unable to send data to TTN

I have connected a RFM95W connected with an arduino UNO and a DHT11 sensor and a BHT button in connection with the arduino and trying to send the data sensed to the TTN every 60 seconds. And a downlink payload function to switch on/off two LED’s.

My code is attached below
New Text Document.txt (12.6 KB) .

The first issue is, the code when uploaded to the arduino UNO, shows “Low Memory Available, stability problems may occur”, which got resolved by implementing it on an arduino MEGA. But is there any other way to still use the Arduino UNO.

The Second issue is: The programs starts and it shows:
" packet queued"
“EV_TXCOMPLETED”
and then goes into standby mode and no further process takes place.
And the device isn’t even being connected on the TTN webpage.

A basic model ATmega is just not a good choice for this - with extreme care a simple node might fit, but you’re going to be squeezed all the time. And ATmegas are no cheaper than many other choices that have more memory.

The Second issue is: The programs starts and it shows:
" packet queued"
“EV_TXCOMPLETED”
and then goes into standby mode and no further process takes place.
And the device isn’t even being connected on the TTN webpage.

Your code appears to try to wait 60 seconds before sending again. But it’s possible the scheduling of do_send() which ideally calls LMIC_setTxData2() is not working.

You might want to check that you stay within the 30 seconds of air time per day, under the fair access rules.

And using a board thats native 3.3V, avoids the need for logic level conversion when using the RFM95W with 5V UNO or mega boards.

conflicts with:

HPD13A and RFM95W are not the same module (but they are compatible).
What is the actual module you have used?

The same 8-bit AVR microcontroller is used on LoRa32u4 and Arduino Pro Mini (although on 3.3V it runs at 8 MHz while on Uno runs at 16 MHz). So you may find relevant information in LoRa32u4 and Pro Mini articles on the forum. See Big LoRa32u4 boards topic and notice the “Get the basics working first” information there.

For getting more memory available you can disable PING and BEACONS to save some memory (see LMIC documentation).

Have you properly configured the LMIC library for the correct region / frequency band?

Check the Data tab in the TTN Console of your Application and for the device to see if you can find any Join requests coming in.
If not then you may not have gateway coverage in your area and/or the LoRaWAN keys / id’s may have been entered incorrectly. See: Format of Keys and ID's for Arduino LMIC libraries [HowTo]

As said by others already. The LoRa module requires 3.3V supply voltage and 3.3V logic levels. Arduino UNO uses 5V for both however. Converting the logic levels requires a level converter.

What sketch did you originally use as starting point?
The following part in your code looks suspicious because this is not where region/frequency is usually configured and could be the culprit of your problem:

#ifndef CFG_eu868
#define CFG_eu868
#endif

CFG_us915 is probably still defined (default) in the library’s project configuration file.
See LMIC documentation for where to properly configure the region/frequency band.

FYI: Code attached as a .txt file is not practical to have a look at because the file has to be downloaded first and the txt extension disables syntax highlighting in editors/viewers.
Preferred is to include a link to the file in an online repository, or add the code in the post properly formatted using the following guidelines: How do I format my forum post? [HowTo]