We have a short program in the spark core and we are using a char array to display it in an lcd display.
char Str[60]
When we increase the size of the array, the core doesnt flash. It looks like there is a communication error and the core doesn´t see it is being flashed (USB). We think it is because of the small size of the internal memory.
I want to store the array variable in the external memory but i don’t know how, does anybody have a basic program showing how to use it please?? thax
@alic3, first I would say you should make Str[] 81 bytes in size which is the longest message (20x4) plus one terminator (\0) byte. Second, you don’t have any test for letras exceeding 80 - you should do a range check. Lastly, after your while(Str[letras] != '?'); finishes, you do while(1){delay(50);} which most likely stalls the background process so you will lose cloud connectivity. You should instead have:
@alic3 unless you specifically use SYSTEM_MODE MANUAL or SEMI_AUTOMATIC, the Core will attempt to connect to the cloud. If it cannot, the user app will be blocked until it connects. if you don’t allow the background process to run the cloud will disconnect. Thus why I suggested the added code
@alic3, I ran your code with the changes I suggested and included some Serial.print() debug messages to make sure the code was running completely. One oddity I found is that the "¿" character at the beginning of your text does NOT agree with the compiler and gets interpreted as 2 garbage chars in the first two positions of the char array! So removing that character, I ran the code with an array size of 81 (max chars + null) and had no problems.
I had no problems with flashing the Core OTA or via USB so I am not sure what you are experiencing. Exactly how are you trying to flash the code via USB?