I'm new with microcontrollers.
I have a code in Arduino IDE to collect and send data to TTN. Everything its working fine.
How I can build a bin file to load on boot every time that the Adafruit SAMD21 (M0) start or is connected?
I have create a bin file from Arduino IDE, them load with bossa SAM-BA but the bin file seems do not start the code and instructions. I see many tutorials and videos on Internet, but all times the procedure is vague or difficult to do.
the code you upload to arduino stays there and runs again on power up, why do you need to upload it again? Writing the whole program into flash every time you switch on the board will eventually use it up
You are right.
However I have this problem on power up the node. That's wear that the code is compile and upload to the microcontroller without any error.
Once the code is upload to the microcontroller I can see on serial monitor of Arduino IDE and TTN the results.
But when I try to disconnect the microcontroller and power up I don't receive anything on TTN.
If I upload again the file into the microcontroller I see the results.
Yes yes, that's is working now but only with a USB data cable. thanks so much killzone_kid...
The first step is now working 100%.
Now, I test the same procedure connecting the board from a usb charger cable or connecting a battery and the code not boot from uploaded file. I need to add some code the file.ino?
The first approach is when I start the monitor serial the code works, but if I no start the serial monitor the code do not work. So, the problem is in the code. I'm looking for little idea to fixed the code.