You’re not really making it easy for people to help you… Please don’t post images for what is just text. Also, please don’t expect people in an English forum to understand Portuguese.
But okay, you’ll need to disable some functionality in the library to free some memory for the debug info, like maybe using DISABLE_MCMD_PingSlotChannelReq or #define USE_IDEETRON_AES. See its README. Might be overkill just for the debugging, but might be useful when using this hardware for some real work anyhow. (If memory is low even when not enabling debugging, then the hardware might need a different library with a smaller footprint.)
Also note that the TTN community network is using LoRaWAN 1.0.2, if I’m not mistaken. So, you might want to select that. Unrelated to your problem though.
Sorry for post pictures but it’s easiest to pass the information about what I’m seeing. I’m not able enable debugging even with DISABLE_MCMD_PingSlotChannelReq or #define USE_IDEETRON_AES.
However as you told I change the version to LoRaWAN 1.0.2 and now is working
Thanks a lot for you help!
I know that this is of topic, but do you know any example of send message triggered by a event? For example every time the door is opened my node sends a uplink to TTN?
Oh, that actually surprises me. Are you sure nothing else changed?
Maybe the actual fix was that you made some memory available? How much free space was available before you made the changes? (You might want to revert the changes, now that you still know what you did, and take note of what the Arduino IDE tells you during upload.) I’m not sure if a sketch that uses 100% of the available program space is actually bad for Arduino.
Aside: note that DISABLE_MCMD_PingSlotChannelReq and #define USE_IDEETRON_AES were just one of the many example from the README; there are many more options, such as, for example, #define DISABLE_PING and #define DISABLE_BEACONS that can free some more memory if you need more to program space to handle some sensors.
I very much disagree for images that basically are text, such as the output of the Arduino serial monitor and compiler. The images are super small on a mobile phone. And people cannot search for the text in the images, or copy text (including the URL from your error message!) from the images. Also, the forum has options to format text.
If you want to just check some input using some timer, then many examples of, e.g., temperature sensors will be a good start. If you want to sleep until the switch changes state, then you need to search for “interrupts”. Maybe Arduino pin interrupts helps, but I’ve not read it. Beware that there’s no real guarantee that the radio transmission is received.