Proportional coding

From wikiluntti
Revision as of 20:11, 16 October 2020 by Mol (talk | contribs) (→‎Exercises)

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.


Exercises

See exercises at line follower or gyroscope page.

Back to Mahtavaa Matematiikkaa 2020