Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
That's very very old code . . . it sounds like the camera is upside down when you described the Y issue . . .It's just a guess here, but change this line:cam_Y_location=990 - (32*y_multiplier) + Y_old*y_multiplier;to this:cam_Y_location=990 + (32*y_multiplier) + Y_old*y_multiplier;If that doesn't work, scan the code for things that would have wrongly inverted the Y axis. Maybe you accidentally added something when porting the code.I used HS-311 servos, so they're likely to not work the same as the HS-425's. Likely just the center value and the range needs to be tweaked. I've found some servos respond with signals from 0.5ms to 2.5ms, while others are just 1ms to 2ms.
I ended up flipping the y-axis servo over to resolve the issue I was having, and now I have both pan and tilt working together tracking an object
It works, however the x servo no longer goes all the way to the left, but goes all the way to the rightdebugging my code I see that it will not send a servo position lower than around 1200, just odd
Quote from: thx123 on November 17, 2011, 02:28:30 PMIt works, however the x servo no longer goes all the way to the left, but goes all the way to the rightdebugging my code I see that it will not send a servo position lower than around 1200, just oddAre you sure you got the camera aligned with the servo center location?
I found that if I enable color segmentation 'g1' on the Blackfin, it runs much better when it comes to tracking objects, in my case a red ball. (it ends up blocking out everything else except the set color blob you want to track)Just taking a quick look at your code, it looks like you increased the resolution to 320x240 and also the baudrate to 115,200. I was just wondering if these increases has made things work better for your ERP?