Yes, you can have as many USB serial dongles as you care to plug in to the Pi (or USB hubs) and one serial link connected to the Pi's UART pins.eytan wrote:Thanks for the response Joan.
So I assume from your post, that I can in fact have 2 serial links simultaneously and output to each one separately.
One link to my arduino ( via USB ) and one to my SSC-32 ( via USB-Serial adapter ).
Maan I registered just to thank you, with \r on the end of the command the servos finally moved! I just make it with an Edison + a Veyron servo driver. Anyway thanks again!:)eytan wrote:Yes, I just checked. On my Arduino code I used println on the last command. Duhhhh. So much to remember![]()
Ok, so here's another update on the fix.
After I reported everything was working, it stopped working.
Then I had to figure out why.
I went to a previous program revision to compare.
While trying to get something to work orriginally, I had taken some code lines from this post :
http://www.robotshop.com/forum/ssc-32-u ... y-pi-t8678
so the line that I took out which caused the problem was :
ssc32.write("rev\r")
well I didnt know why this was required.
If I take out the <cr> servos fail to move even with the rev\r command.
well this was driving me a little crazy until I learned that \r is "return"
so now instead of <cr>, just use \r as per the following example line.
ssc32.write("#1 P1600 T2000 \r")
Code: Select all
#!/usr/bin/python
import serial
import sys
import time
ssc32 = serial.Serial('/dev/ttyUSB0',115200,timeout=1.0);
print('start')
while True:
ssc32.write("#1 P1500 \r")
time.sleep(2)
ssc32.write("#1 P2000 \r")
time.sleep(2)