-
Notifications
You must be signed in to change notification settings - Fork 10
Line following improvements #132
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
base: main
Are you sure you want to change the base?
Conversation
error = reflectance.get_left() - 0.5 | ||
# Input your threshold value here: | ||
threshold = 0.5 | ||
error = reflectance.get_right() - threshold | ||
|
||
.. tab-item:: Blockly | ||
|
||
.. image:: media/set_error.png |
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.
wrong block
Let's do a quick check to make sure the code makes sense. We assume base_effort | ||
= 0.5 and KP = 1. If the reflectance reads whitish-grey and yields a value of | ||
around 0.25, the error would be -0.25, meaning that the left motor's effort is: | ||
.. code-block:: python |
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.
too small
|
||
.. tab-item:: Blockly | ||
|
||
.. image:: media/one_edge_line_follow.png |
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.
broken
|
||
Just to review, let's take this code line-by-line and make sure we understand what's going on. | ||
|
||
:code:`threshold = 0.5` sets the threshold value to 0.5. |
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.
inline blockly?
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.
Would rather not, i think it's intuitive enough to be able to compare side by side - using sphinx to do inline images is really tedious
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.
you never made changes and also you need to fix merge conflict
Made all non-blockly related changes |
General wording and explanation improvements.
Fixes #66, #74, #75, and #76.
One sensor proportional control still needs video.