You are browsing as a guest. Sign up (or log in) to start making projects!

28m 1s logged

Devlog #2 — Connecting Computer Vision to a Servo Today I continued working on the software for my automatic tracking turret. After getting OpenCV to detect yellow objects and find their position, I started working on using that information to control a servo. I set up serial communication between Python and my Arduino so that Python could send the detected object’s X coordinate to the Arduino. The Arduino then uses this value to determine whether the object is to the left or right of the camera’s center. I added a small center area where the servo stays still when the object is already close to the middle. This helps prevent the servo from constantly moving back and forth because of small changes in the detected position. The basic tracking system is now working: OpenCV detects the yellow object, finds its X position, and sends that information to the Arduino to control the servo. Next, I want to improve the movement so the servo moves faster when the object is far from the center and slower when it gets closer.

0
1

Comments 0

No comments yet. Be the first!