Proportional coding: Difference between revisions
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
== Example Video == | == Example Video == | ||
We use proportionality in two examples, following a line and driving according to a given angle. | |||
<youtube>kVce9k_e6OI</youtube> | |||
<youtube>g3d5Kh0aT14</youtube> | |||
== Theory == | == Theory == | ||
The line follower [[Follow_a_line/en|follows the line]], or actually the border of the line. If the light sensor reads too small values (dark), the robot will turn to other side. If the values are higher (lighter), the robot turns to other side. The proportionality constant determines how fast the robot will steer. | |||
Exactly the same approach is used in the [[How_to_use_gyroscope/en|gyroscope]] example. If the robot's direction angle differs from the decided direction, it will steer. The proportionality constant defines how fast the robot will steer. | |||
<gallery> | <gallery> | ||
Line 28: | Line 38: | ||
== Exercises == | == Exercises == | ||
See exercises at [[Follow_a_line/en|line follower]] or [[How_to_use_gyroscope/en|gyroscope]] page. | |||
Back to [[Mahtavaa Matematiikkaa 2020]] | Back to [[Mahtavaa Matematiikkaa 2020]] | ||
[[File:Mahtavaa matematiikkaa.png|thumb]] | [[File:Mahtavaa matematiikkaa.png|thumb]] |
Revision as of 20:11, 16 October 2020
Introduction
Very often proportionality is used in robotics programming. Proportionality is an important topic on mathematics curriculum. The proportionality means a straight line (with slope, or gradient, ) passing through the origin. In robotics, the slope is first translated to pass the origin.
Aim
Slope, straight line. Multiplication.
Robot
Almost any robot will do, we use here Asimov 2/ Verne robot.
Sensors
No sensors are used.
Example Video
We use proportionality in two examples, following a line and driving according to a given angle.
Theory
The line follower follows the line, or actually the border of the line. If the light sensor reads too small values (dark), the robot will turn to other side. If the values are higher (lighter), the robot turns to other side. The proportionality constant determines how fast the robot will steer.
Exactly the same approach is used in the gyroscope example. If the robot's direction angle differs from the decided direction, it will steer. The proportionality constant defines how fast the robot will steer.
-
The red and green lines do not pass origin, but show proportional relation.
-
The linefollowing robot uses proportionality
-
The proportionality is very important while driving to a given angle with the gyroscope.
Exercises
See exercises at line follower or gyroscope page.
Back to Mahtavaa Matematiikkaa 2020