If someone can point me why it is output garbled content, I appreciate.
Serial.println(motorPos + txt + countPos + txt + l + txt + r + txt + lrDiff + txt + motorDir);
Serial.println(String(motorPos) + txt + String(countPos) + txt + String("l") + txt + String(r) + txt + String(lrDiff) + txt + String(motorDir));
Hardware: 1- Arduino (UNO R3) 2- Steeper (28BYJ-48 - Pins IN1:8, IN2:10, IN3:9, IN4:11 - 5V) 3- Ultrasonic range finder (HC-SRD4 - Pins E:12, T:13 - 5V) 4- Buzzer (Pin 3)
It starts well
Hi,Even though you have said that you have had it running, can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png or pdf?Have you tried reloading with the older IDE again to see if it still works?Tom...
I know it's not the same as schematics, but I found that a real picture was easier and funny to do... I've just add it to Git Readme.
But how is the best and memory efficient way to that in C?
There is a good way to output such string to the Serial
Yes, use sprintf(). For a list of all the formatting options, see this page.