Moving Gradually
Last updated
Was this helpful?
Last updated
Was this helpful?
Create new variables to hold the max and min positions that you wrote down in the part 2. Don’t use my values, use yours.
Change your old code to look more like this. Once you have made the change, the code will not allow your servos to exceed the maximum position.
You could also change the speed of your servos by changing the value that the servo position variable gets added/subtracted by in these lines of code…