Yep, back feeding is a problem. I had a project where the device I connected to had it's own power system. Everything went fine till someone thought my project should be turned off at night but left the connected device powered. This resulted in...
Hi Kurt,
I did try this, looks like it suggested the issue is in ArduinoJson library, likely my code calling it at some point.
It reports nullptr, not too sure what to look for. I'm not using malloc or new in my code but I expect it could be...
This is not as straight forward as I first thought, I'm trying to better understand this kind of issue.
The reason I want know more is because in a rather large program I wrote (>5000 lines) running on T4.1 and is working 99.9% of the time.
I...
Done with,
strncat(oneBuf, twoBuf, (sizeof(oneBuf)-(strlen(oneBuf)+1)));
However, I can see an issue if either array is missing the nul terminator.
Will have to confirm the arrays are properly null termed before any strcpy/strcat operation.
Lots...
Thanks, I got a better understanding on this now. Always learning new stuff.
I used this code to show how coping beyond the buffer size can cause issues.
char oneBuf[12]={"firstbuf "};
char twoBuf[20]={"secondbuffer"};
void showLines(){...
Pete I agree, and I would never let this code be used. This was just an test of what could happen when you don't make sure there's room for the copy. The code has no two byte variable declared, just the buffers, could the 2 byte gap just be...
I was trying to copy more char's into oneBuf[10] from twoBuf[20] than it could hold, to see the effect it would have on oneBuf.
as expected strcat did what was asked of it and blindly added it to oneBuf (there by writing beyond the end of...
Hi, so I'm just trying to get a handle on the array (char type) operation.
running this code
char oneBuf[10]={"is one"};
char twoBuf[20]={"second34"};
char lstBuf[40]={"big array"};
void showdata(){
Serial.print("address of oneBuf --> ")...
The question then
Why does the compiled code become 8 bytes larger when the reference type is used?
If it makes a copy (pass by value) I might expect it to be larger.
//pass test1
//void dotWait(int toWait){ //compiles ->59672 bytes...
Hi, I'm trying to figure out how these two code blocks differ.
void dotWait(int toWait){
uint32_t startMillis=millis();
while(millis()<=(startMillis+toWait)){
Serial.print(".");
delay(200);
}
Serial.println();
}
void dotWait(int...