after 25 active years of coding, Ive never encountered anything comparable to what happend today.
Using the Adafruit Motorshield v2.3 on the UNO, connected to 4 DC-motors, there were so many "bugs", which are absolutly impossible to happen. But they did.
Like a boolean variable was not set, but the println before and after was executed. Or motor-speeds are only set the first 2 iterations, or the value of a variable was the same from a previous compilation or the assignment of a value only works, if I used a println to control the assignment.
Is this kind of behavior normal? Weve even exchanged the arduino board, which solved some problems but revealed new ones.
We were able to solve some other problems by simple exchanging the order of execution for some independent function calls.
Thats the point, where determinism is lost at all. It cannot be, that the order of excution of int a = 5, int b = 6 reveals different content of a and b. And if I exchange the UNO boards (exactly same revision) and run exact the same code and get different results, what is going on?
Do I have 2 faulty boards? Or is the motor-shield interfering with the Arduino? Or is my Android Studio playing tricks with me?