Input
Motor 1
Motor 2
Motor 3
LED 1
LED 2
Buzzer
Exercise 2.
Press “
Program
” (the red flashing light
indicates that the program is being recorded) and then
the necessary buttons in order to create the following
sequence:
Ÿ
left fan rotates clockwise;
Ÿ
both fans rotate at the same time in any direction;
Ÿ
red LED on;
Ÿ
orange and green LEDs on at the same time.
Once you finish, press the “
Program
” button again to
save the program and then press the “
Play
” button to
check if the command sequence is correct. If you press
and hold the play button for longer time the program will go
into loop (endless repeat).
Exercise 3.
Note that the ERP does not record the elapsed time
between the button pushes and it just plays all the
recordings without delay. Record again, but this time
add delay between each command of exercise 2 by
pushing the “Idle Time” button. Check the results on
your model.
Exercise 4.
Record the following sequence in order to simulate
traffic lights control. Don’t forget to use appropriate times:
Ÿ
red light on (cars stop);
Ÿ
red and amber light on simultaneously (cars ready to go);
Ÿ
green light on (cars go);
Ÿ
amber light on (cars ready to stop);
Ÿ
red light on (cars stop).
31
Level Of Difficulty
Level Of Difficulty
®
The Engino Robotics Platform (ERP) is a robotic system
consisting of a main controller with different buttons, able to
connect with various peripherals: motors, lights and sensors.
Learn how to program the ERP device manually and create a
sequence of commands for traffic lights control.
What inputs and outputs are.
What a command sequence is.
How to program a robot manually.
How to reverse-engineer a program.
How to use the ERP simulator.
What a flow diagram is.
Procedure:
1.
Find the instructions in
pages 42-47
and
build the
dinobot
model. Lets wake it up, by
recording the sequence of
exercise 1
.
2.
Connect the ERP device with the PC
using the USB cable.
Open
the
Engino
Robotics Platform Pro
1.2
software and
click the
Connect USB
button.
3.
Click the “
Receive Program
” button,
so the recorded sequence is uploaded
on the computer. A vertical line of blocks
should appear, called “
flow diagram
”.
4.
Click the “
ERP Simulator view
”
button and answer
exercise 2
.
5
. Follow
exercise 3
to learn more about the
action blocks and their variables on the flow
diagram. Make changes by dragging and
dropping the blocks. Right-click on each one
(motor, light, buzzer and idle), observe the
pop-up windows and complete the table.
6.
Clear the screen by clicking the icon
“
New
”. Click the “Program” button on
the simulator (on the computer) and record
the same program as in procedure 1.
Observe what happens to the model and on
the screen.
Materials Needed:
®
-
Engino
Robotics PRO (STEM 70).
Materials Needed:
®
-
Engino
Robotics PRO (STEM70).
- Computer with ERP software downloaded
(www.enginorobotics.com) and installed.
Output
Exercise 1.
Push the buttons on the ERP device (input) and
write briefly the outcome you observe on the model (output).
Exercise 3.
In the flow diagram,
delete
the first motor icon
(
drag and drop
in the bin) and
add
an “
Idle
” icon
(from the left). Tick the boxes below to indicate which variables
can be changed for each action block.
Exercise 1.
Using the
dinobot
model record the following
sequence:
Ÿ
both green LEDs on at the same time (eyes open);
Ÿ
motor 2 rotates clockwise (mouth opens);
Ÿ
motor 2 rotates anti-clockwise (mouth closes);
Ÿ
motor 1 rotates clockwise (small legs move);
Ÿ
buzzer on (dinobot roars).
Upload
your program on the computer (see steps 2 and 3).
Can you
modify...?
port
time
state
direction
delay
after/
with
prev.
speed
Motor
LED
Buzzer
Idle
Exercise 2. Drag and drop
the peripherals (motors,
LEDs and sensors) into the
ports of the ERP simulator,
according to the dinobot
model. Make sure that you
set them up correctly as this
affects the program and the
way your robot will behave.
Design them here as well.
Exercise 4.
On the flow diagram make the following changes:
Ÿ
the eyes light up at the same time and blink 2 times;
Ÿ
the mouth opens and closes (use only one block);
Ÿ
there is sound at the same time that the mouth moves;
Ÿ
there is delay for 2 seconds and then the small legs move;
Ÿ
the program should repeat for 2 times, not forever.
Tip: for this, right-click on the “
start
” block to choose
the number of repeats, also called
loops.
A robotic system could not be complete without a programming
software. The ERP software is capable of receiving a recorded
program from the device or send a program to it. Wake up the
dinobot first manually and then through the software by using
the ERP simulator, the digital version of the actual ERP controller.
Manual Programming
ROBOTICS
Flow diagram and ERP Simulator
ROBOTICS
Learning about:
Learning about:
Procedure:
1.
Find the instructions in
pages 39-41
and
build the
experimental robot
model. Make
sure you connect each cable with the correct
port. You can also twist the cables around
other parts so they do not get in the way.
Install 3 or 6 AA batteries on the back
of the ERP and power up the device
by pressing the On-Off button.
2.
Press the buttons (input) on the ERP in
exercise 1
and write the results you observe
(output). On the motors, place the switch in
position
II
and try both buttons on the ERP.
Note that in position
O
the motor does not
work and in position
I
direction is reversed.
3.
A useful function of the ERP is the ability to
record the buttons’ sequence. To test this,
press the “Program” button to record the
sequence in
exercise 2
. To save recording
press the “Program” button again and then
“Play” to test it. You can make many trials
until you find the corresponding buttons.
4.
Did you notice that there is no delay time
between the button pushes during the
playback? Read
exercise 3
to add this.
5.
Use what you have learnt so far in order to
create a program concerning traffic lights
control. If you are unsure
about the correct order
you can review it in
exercise 4
.
®
Engino experimental robot
32
®
Engino dinobot
7.
Make changes on the flow
diagram, according to
exercise 4
. Send the
program to the ERP by
clicking the “
Send Program
”
button and check it.
Save
the program as
“dinobot
” .
motor switch
in position
II
motor switch
in position
II
Discover:
Discover:
Discover: