View Single Post
  #1   Spotlight this post!  
Unread 22-02-2010, 15:24
Joohoo's Avatar
Joohoo Joohoo is offline
Registered User
FRC #0340 (G.R.R.)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Rochester
Posts: 241
Joohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really nice
Send a message via AIM to Joohoo Send a message via Yahoo to Joohoo
Camera Code in main thread + watchdog = twitching servo?

Ok here is a problem that we are finding when we combined the default circle tracker code, with some modifications to remove the pan/tilt servos.

When we add this code into our moderately sized project, we find that our first servo that we instantiate twitches. This happens regardless of where which pwm port we plug it into.

My thoughts were that since the watchdog is running in the background and there are a few Thread.yield() calls in the canned code we got. We are confusing the watchdog making it start it's shtf shutdown sequence, starting with the first servo it can find, the one w/ the lowest address. Then after the thread stops yielding, it recovers and sets the servo to the specific value that it was before the thread yielded.

Is this a reasonable explanation or is this not possible with the way the watchdog works. Is this what happens when you yield the main robot thread?

Last edited by Joohoo : 22-02-2010 at 15:29.
Reply With Quote