Télécharger Imprimer la page

fischertechnik COMPUTING ROBO MOBILE SET 8 Mode D'emploi page 50

Publicité

Les langues disponibles
  • FR

Les langues disponibles

  • FRANÇAIS, page 59
R
M
S
A
B
O B O
O B I L E
E T
C T I V I T Y
O O K L E T
GB+USA
As a final detail you now have to create the subprograms used in this subprogram.
But wait a minute! Most of them already exist. The light-seeking subprogram for example can be copied
from the program for the Lightseeker Model. If you don't remember how to do this, please read chapter
4 of the ROBO Pro manual.
But watch out:
For the Lightseeker Model the phototransistors were connected to input terminal I3 and I4. But now they
are on I6 and I7. Additionally, we queried pushbutton sensor I1 to count the pulses when turning left,
and I2 when turning right. Now there is only I1 to count the pulses, which works just as well by the way.
This means that you will have to adapt the light-seeking subprogram after you have copied it. Since the
sensor query is hidden in the subprogram it is easy to miss. This won't happen if you place the inputs
into the main program and connect them to the subprogram using data inputs. But you weren't aware
of this yet when we worked on the Lightseeker.
The subprograms for evasion also already exist, we wrote them for the Obstacle Recognition Model.
Here the pushbutton sensor I5, queried additionally when going backwards, has already been placed
into the main program
You can take a look at the finished program under Obstacle-Light.rpp.
At first glance the main program looks very clear and simple. But there is a lot of mental elbow grease
behind the subprograms. Still, by using the step-by-step approach of the top-down method you too
would be able to tackle such a complex program.
By the way, if you have a friend who owns a ROBO Mobile Set as well, you can go even further with
these experiments. Simply mount a source of light on each of the robots. And both robots will be seeking
each other.
Robot with
■ We have just seen, in the previous example, how to approach the programming of a more complex
program. Now you can turn to another very important behavior of a mobile robot. It is supposed to learn
Edge Detection
not to fall off the table. In most cases driving against an obstacle won't hurt the robot. But if it falls off
a table that is almost three feet high it might be damaged in one way or the other, even if the
fischertechnik building blocks are very robust. For this reason the robot will be equipped with sensors
that enable it to recognize edges. These edge detectors each consist of a pushbutton sensor that is
activated by a rotating wheel. This wheel is also able to move up and down. As soon as the wheel moves
over the edge of the table it drops, the pushbutton sensor is no longer activated, the program realizes
that the model has reached a precipice and reacts accordingly. The robot has 4 edge detectors in total,
enabling it to feel for a precipice on each side while going forward or backwards. As a result this model
does not have a pulse sensor to measure the distance traveled. The covered distance will be controlled
using the on-time of the motors.
First assemble the model according to the construction manual.
4 4
8 8
4 4
8 8

Publicité

loading