<< return to Pixycam.com

Pan Direction



Got the Pan/Tilt demo working but I’m using my own servos. Rather than following my object pixy avoids it and looks away from it. I need to reverse the direction of the Servo…is there an easy way to do this? :-/



Hi Andy,

Are you using the Arduino pan/tilt demo or the Pixy-only pan/tilt demo?



Hi Scott,

It performs the same using both demos. I will likely end up using the arduino in the end though.



Figured this one out!

So, for anyone having this issue where the servo they are using is making the pixy actually run away from the object rather than follow it…

In the arduino pan/tilt example there is a line of code as follows:

m_pos += vel; (It’s in the void ServoLoop::update(int32_t error) loop).

Literally just change this to: m_pos -= vel; and it’ll start tracking properly!

Hope this proves helpful to anyone having issues.



Hi Andrew,

Glad you were able to figure it out!



this solution worked for me, and get my thumbs up


That’s good news :+1: