Shared publicly  - 
urgh. I'm messing about with servo.writemicroseconds() to try to get fine-grained movement on a positioner. The servo will run for a while, then stop, randomly, sometimes running fast, sometimes just creeping. If I look in dmesg the board keeps disconnecting from the USB system, taking new addresses and new USB id's. Grumble.
David Crosswell's profile photoJohn Bump's profile photoCad'ika Orade's profile photo
Sounds like hardware - faulty cable/connection.
Disconnect, then reconnecting.
I've tried two cables. Next, I guess I get to try another arduino.
My guess is that the servo.write library uses the same timer for its PWM calculations that the serial.write (and/or tx/rx) is using for timing, so they're stepping on each other and tx/rx is losing.
How about the back end of the ports?
Everything secure?
If it's disconnecting on a frequent basis, it's unlikely to be a dry joint, but a connection could be faulty.
Three USB ports on the computer, all the same. Le sigh. The joints on the arduino itself look solid; I suppose I could reflow them, but it's worked for months with other projects.
And what makes me particularly suspicious about timing issues within the arduino is that when it's hung up, if I start reading the serial buffer from the host computer it'll start moving the servo again.
When it's loaded with code that does nothing but servo control and there's nothing else plugged into the host usb, it's fairly reliable. But it looks like if you want good servo control using writemicroseconds you probably want to use external power rather than USB for the whole board if you care about stability.
I'll be sure to keep that in mind.
I love my Arduino, but I sort of wish it had come with more documentation. Took me ages to discover that I cannot have anything connected to the tx/rx serial pins or programming would fail.
I can field a lot of Arduino questions, and there are other people on G+ that can field some extremely complicated questions. (Ditto linux, when you start playing with that more.)
This is why I love G+ so much. You meet the most interesting people!
Add a comment...