Drive a given path/fi

From wikiluntti
Revision as of 17:34, 12 September 2020 by Mol (talk | contribs) (Created page with "Kurssia tukee rahallisesti [https://meet-and-code.org/ Meet and Code]. Kurssi on suunniteltu yhteistyössä [http://www.fllsuomi.org/ Robotiikka- ja tiedekasvatus ry]:n kanss...")

<languages/>

Introduction

The robot drives the path given in advance. The path can be of any shape, but some simple paths are preferred, as the robot will eventually fail due to the tolerance. The paths given here are an obstacle and baseball field, also encircling the obstacles.

Robot

Almost any robot will do. This example is done with Asimov 2/ Verne. Depending on the orientation of motors, and/ or gears, the steering direction might be the opposite.

Sensors

No sensors is used. Expect the servo motor rotation angle, or the timer.

Example Videos

Theory

Encircling one obstacle is rather easy, and can be done using only one programming block. However, more speed and accuracy is gained by using more programming blocks.

Encircling the baseball field is more advanced, but still rather easy job to do.

Example Code

There exists a huge amount of different codes that do the thing. Here is only one version. Do your own. The code is shown below.

Example code of encircling an obstacle.

Exercises

  • Kierrä rata täsmälleen annetussa ajassa, esimerkiksi 80 sekunnissa.
  • Kellota aika ja yritä kiertää rata mahdollisimman nopeasti
  • Mittaa lähtö- ja lopetuspaikkojen erotus. Pyri minimoimaan se.
  • Kierrä N (esimerkiksi viisi, 5) kierrosta radan ympäri. Mittaa (i) aikaa tai (ii) aloitus- ja lopetuspaikkojen erotusta. Pyri minimoimaan ne.


Takaisin Meet and Code 2020 I: Ev3-G

Kurssia tukee rahallisesti Meet and Code. Kurssi on suunniteltu yhteistyössä Robotiikka- ja tiedekasvatus ry:n kanssa.