-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added-missing-examples-of-Servo-library #52
base: master
Are you sure you want to change the base?
Added-missing-examples-of-Servo-library #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please always thoroughly test your code before submitting a pull request.
Please do a Tools > Auto Format if using the Arduino IDE or Ctrl + B if using Arduino Web Editor to ensure your formatting is consistent with that of the official Arduino example sketches.
Please remove pointless blank lines. Using blank lines to separate code into logical sections is fine, but random blank lines just make for more scrolling to read the code.
You use the term "analog" in the name of the "AnalogInput" sketch and in the comments, but there is nothing analog in this sketch. The servo is controlled by the duty cycle of a PWM signal. But the user doesn't need to know that. They only need to know that the position of the servo horn depends on the value passed to writeMicroseconds()
.
Thank you for your valuable feedback. I will make sure to follow your suggestions from the next pull requests. |
No, please don't make a new pull request. Just keep working on this one. Any commits you make to the added-library-examples-of-servo branch of your fork will automatically be added to this pull request. |
Sure. Thank you very much. |
@per1234 I have made a commit in the added-library-examples-of-servo branch with suggested changes. |
This pull request is in answer to the issue #51 . I have added 2 examples which includes below-mentioned methods.
-> servo.writeMicroseconds()
-> servo.read()
-> servo.attached()
-> servo.detach()
Examples have been tested on tinkercad and work as expected.