I'm trying to do as the book suggests but I'm stuck on this simple first exercise of making my MG996R Tower Pro servo move.
Attached image shows what book says to do.
I've researched other posts, and got past the constructor problem. Thanks to Chris Walker's post, I included a reference to SecretLabs.NETMF.Hardware.PWM (version 4.0.30319). That got the constructor to take a single argument as this book specifies.
Now I want to move the servo through its full range, 180 degrees. This code doesn't do that, nor does it seem to work. The servo moves, but not just a single 90 degree arc.
Two questions, please.
1. What code do I use to insure that I know where the servo is starting at? I'd like to have it initialized to halfway: can move 90 degrees left of 90 degrees right. I think I have to assume it could have been left at any position the last time it had power.
2. What code do I use to make it move 45 degrees from this initial state? Doesn't matter which direction. I can figure that out once I can make it move 45 degrees. I can figure everything else out as well, once I can do this simple logic.
Its a Plus2 that I bought a few months ago. I bet a lot of "This book no longer works" questions have been posted, but I couldn't find a complete solution to this simple task.