Flowchart – Heartbeat 1

Download Report

Transcript Flowchart – Heartbeat 1

Flowchart – Heartbeat 1
Sensor Loop: Loop until sound sensor >70 (Port 2)
Yes
Start
Motor A, Move
Backward, 1/3
Rotation,
Power 20
Wait, 1
Second
Sound
Sensor
(Port 2)
Less than
70
No
Display: Heart
Wait,
sound
sensor
<70, Port
2
Wait, sound
sensor >70,
Port 2
Motor A, Move
Forward, 1/3
Rotation,
Power 20
Wait, ½
Second
Move
Forward,
Ports B & C,
1 Second,
Power 30
Play Sound:
“Brilliant!”
Volume Level
100
Program – Heartbeat 1
Flowchart – Heartbeat 2
Sensor Loop: Loop until sound sensor >60 (Port 2)
Yes
Start
Motor C, Move
Backward, 1/4
Rotation,
Power 20
Wait, 1/2
Second
Sound
Sensor
(Port 2)
Less than
60
No
Display: Heart
Wait,
sound
sensor
<25, Port
2
Wait, sound
sensor >25,
Port 2
Motor C, Move
Forward,
1/4Rotation,
Power 20
Wait, ½
Second
Play Sound:
“Brilliant!”
Volume Level
100
Program – Heartbeat 2
Robot – Heartbeat 2
Top Corner View
Connect to Brick
Motor (C)
Sound Sensor (2)
Robot – Heartbeat 2
Right Side View
Sound Sensor
(Port 2)
(To Brick)
Robot – Heartbeat 2
Left Side View
Sound Sensor
(Port 2)
Brick