Thanks for chiming in with the Stepper motor question - maybe this way we will get more like-minded people here discussing their Arduino projects 😊Â
All this still makes me wonder if it is the library or the code in the MPU that is not working 100% OK ...? (like the example with the cheap Ethernet shield I had mentioned)
I do like your "count 10 times" approach! To expand on that one, you could also try something like this: instead of waiting for fifoCount to reach at least packetSize, maybe wait for fifoCount > 0, and after that do your "usual" loop?
Â
I did see that the variable "satelite1" (goes for speed1 and high1 as well) was not defined as a specific type - line 33 just says:
satelite1 = 0;
This should probably be something like (this can be byte or int, unless the function "gps.satellites.value" requires a specific type):
byte satelite1 = 0;
And since that variable is only used in the loop() function, you can probably remove the line all together and change this line:
(you defined it as a global variable, where it only needs to be a local variable)
satelite1 = (abs(gps.satellites.value()));
to:
byte satelite1 = (abs(gps.satellites.value()));
(same for speed1 and high1)
Â
Also note: I tend to break my code up in functions, so the main loop() functions becomes more manageable.
I do this typically by moving stuff that goes together and works correctly, into a specific function.
This way you can read the code easier and it becomes easier to debug (disable/modify pieces of code).
(just a thought, not a requirement)
Â