Hi, I realized I have to be more resilient and I have to prove I am wrong!

 

to hardcore Arduino first, to be able to input position data via Serial input(w/o Python), I added couple of lines to Arduino code in Setup:

delay(50) ; 

Serial.println("\n Enter position String to move to.");

 

and in the loop function added serial monitor output what I will type in the serial monitor see pic:

Serial.print(content); //Serial Monitor print entered position String ; 

After compiling I opened Arduino Serial monitor and typed Strings with position and it worked and went to position and Arms J1-J3 incl. Z axe move properly

 

ka

 

so second, I thought how can I debug the serial Input from Python, w/o hardcoding in Arduino and adding simple Python program over serial port interface. So I will need one more Serial interface on my Arduino Mega, because id didnt wirk on standard seroial zero, where serial monitor runs on, so for another Serial port (Serial1) I pluged in USB serial TTL cable from PC to Serial1 on Mega and as the Conclusion,running robot from Python, via Arduino Mega's serial port Serial1 (PIN18.19) it works and I definitelly need to change/overwrite in Arduino program all the 6 Serial commands : instead Serial to Serial1:

"if (Serial1.available()) {content = Serial1.readString();...void Serial1Flush() { while (Serial1.available() > 0) { Serial1.read(); }} Serial1.begin(9600); " )

to be able listen to run the board via serial one(Serial1) otherwise this wont be possible to drive out from Python with the main Serial as it was originally coded. It is not clear why to me why. Alhough I have closed all IDEs and swapped ports and tried all possible combinations of ports, this was the only possible way. Of course I had to put appropriate delay(3) 3-4seconds to allow time betw. the sequences to process next robot movemet. Otherwise Python test code from previous page didnt process all possitions only one.

 

Next step, for next time is assign functions to Tkinter buttons and let Python calculate the Angles from Inversed Kinematics.. see You next time