Hi @JAVIER_MARIN, check this:
And you can get rid of the header files just calling disableCore0WDT(); into setup.
To access the variables on both cores without issues i would use a semaphore with a boolean variable, and would use another set of variables, something like this:
Modbus core:
if (semaphore ==0){
//Dump the modbus variable into the extra variable set
semaphore = 1;
}
Thinger “thing”:
if (semaphore ==1){
// you can define the resources here, aiming to the extra var set
semaphore = 0;
}
In this way the modbus wont update the variables if the thinger process haven’t read the resources, and thinger wont read the resources if the modbus haven’t updated it, it’s a basic way to warantee that just one process will access the extra var set.
Try it and don’t stop improving your knowledge ![]()
Hope this helps.