For my project i have two servos and i need to set them to the right angle every time the program loops. In order do this i use a serial usb connection and send a number to set one of the servos. But for the second servo i need to pass two numbers in one message. I was thinking about a string "X,Y" that i could send and split it between the comma on the arduino, but it seems that i can only send numbers and only 1 number at that over the serial port? How would i go about doing this.
Serial.write("90,90");//does not work...
Serial.write("90,90");//does not work...
is on the PC sending the commands or on thearduino
? I only ask because according to your question you are sending values to the arduino. Could you post the code you use to send the commands with? Posting the code you use to receive them would also be helpful. – cstrutton