c - Arduino pass multiple parameters over serial port -


for project have 2 servos , need set them right angle every time program loops. in order use serial usb connection , send number set 1 of servos. second servo need pass 2 numbers in 1 message. thinking string "x,y" send , split between comma on arduino, seems can send numbers , 1 number @ on serial port? how go doing this.

serial.write("90,90");//does not work... 

you can do:

serial.write(90); serial.write(90); 

or:

 byte buf[] = {90, 90};  serial.write(buf, sizeof buf); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -