Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Engineer1999
Copy link

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.

Copy link
Contributor

@per1234 per1234 left a 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().

examples/AnalogInput/AnalogInput.ino Outdated Show resolved Hide resolved
examples/AnalogInput/AnalogInput.ino Outdated Show resolved Hide resolved
examples/AnalogInput/AnalogInput.ino Outdated Show resolved Hide resolved
examples/AnalogInput/AnalogInput.ino Outdated Show resolved Hide resolved
examples/AnalogInput/AnalogInput.ino Outdated Show resolved Hide resolved
examples/MultipleServoMotors/MultipleServoMotors.ino Outdated Show resolved Hide resolved
examples/MultipleServoMotors/MultipleServoMotors.ino Outdated Show resolved Hide resolved
examples/MultipleServoMotors/MultipleServoMotors.ino Outdated Show resolved Hide resolved
examples/AnalogInput/AnalogInput.ino Outdated Show resolved Hide resolved
examples/MultipleServoMotors/MultipleServoMotors.ino Outdated Show resolved Hide resolved
@Engineer1999
Copy link
Author

Thank you for your valuable feedback. I will make sure to follow your suggestions from the next pull requests.
Also, @per1234 should I make a new pull request with modification as per your suggestions?

@per1234
Copy link
Contributor

per1234 commented Mar 26, 2020

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.

@Engineer1999
Copy link
Author

Sure. Thank you very much.

@Engineer1999
Copy link
Author

@per1234 I have made a commit in the added-library-examples-of-servo branch with suggested changes.
Thank you for your guidance.

@CLAassistant
Copy link

CLAassistant commented Apr 9, 2021

CLA assistant check
All committers have signed the CLA.

@per1234 per1234 added type: enhancement Proposed improvement topic: documentation Related to documentation for the project labels Jun 26, 2022
@per1234 per1234 linked an issue Jun 26, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Absence of examples of some methods
3 participants