Node only sends 2 packets when I connect it

Hello people! we have a problem in TTN Sevilla, we are trying to have an adafruit feather node M0 send packets every so often, but the problem comes when I connect the microusb sends only 2 packages and then it stops sending anything, so what we want to do is that the node sends packages every certain time, here I leave the code of our device.

Code: https://github.com/PodgroupConnectivity/IoTSoundSensor-sandbox/tree/master/Sound_Sensors_Project/Boards/Adafruit_files/Main/ttn_Test

have a look here for a possible howto