How are you quantifying 'CENTER' on the servo right now? I mean how are you determining 'center'?
Are you trying to let the program do it for you?
Are you moving it manually from end to end and splitting the difference and making a mark at that 'center'?
If you're looking at center and saying that's 'CENTER' because you want it to be center, well, that ain't gonna work.
Take that manual method described above of moving the servo and write a program to send the servo a 1.5ms pulse and see how far off the two marks are. Let the servo tell YOU where center is.
If you are still running that code in your second post, I think you should abandon that code until you figure out how to get full left and right out of your servo's first, before you start adding in buttons and stuff...
Go back to that code in Post #9 and play with that.
Using those values, the servo should move equally left and right (not just a little left and a lot right, 'cause that would mean that your idea of center and the servo's idea of center are two different things, which I think is wrong) and it should do that without binding at either end.
Bookmarks