Hello everyone,
I have two pieces of code that work as intended, and now that I am trying to combine them, they are not fully working. I am relatively new to this, so I am thinking its a simple syntax error or myself completely misunderstanding how something works. Both of the pieces I am working with are taken from tutorials and slightly modified by myself as I am not competent enough to right my own code from scratch yet.
My attempt at combining two codes:
2Stepper_and_Parsing_Test.ino
Code 1:
Stepper_Test_2_Motors_pt2.ino
Code 2:
Serial_Parsing_Test2.ino
(tried posting code but exceeds character limit sorry )
In the combined code, I am inputting and parsing <01> instead of <01,1000>, removing one of the two parsed integers. I deleted a couple lines in the reference code pertaining to the second integer when I added it to simplify things. I will be writing code in the future that needs both, but this current one does not.
When I run this code I see in the serial monitor:
"Motor Position Testing
Positions Available 1-9
Syntax <01>"
When I input and send <02> into the serial monitor I get an extra line:
"Received Bottle Number: 2"
I was expecting to see two extra lines, one like the above but also:
"Moving to Position 2"
which would indicate to me that the coordinateX and Y variables are getting recorded, but unfortunately I do not think that portion of the code is working.
I do not have the motors wired in, I have not gotten to that portion of the project yet, so for now I am relying on the serial monitor output to troubleshoot.
Thanks in advance for any help!
Serial_Parsing_Test2.ino (3.33 KB)
Stepper_Test_2_Motors_pt2.ino (5.56 KB)
2Stepper_and_Parsing_Test.ino (8.39 KB)