Programming a servo motor to stop at specific points
Posted: Sat Jan 29, 2022 1:06 pm
Hi, I'm trying to get a servo motor to stop at 60deg and 140deg, it's driven via pwm from an l298 controller and Arduino Uno, I know the pot bit values from the demand pot for the angles and compare to the feedback pot. I can get the servo motor to sweep back and forth depending on the error between demand and feed back, but Im trying to get it to move to either 60 or 140 depending on if the demand pot is before 90deg or after. I wouldn't mind some help, regards Ben