# Exercise

Goal: simple control algorithm.

Accessories:

• LEGO set
• instruction QuickStart
• software LEGO MINDSTORMS NXT

Output: Report

## Description

What to do:

1. build a simple mobile robot, and simultaneously
2. design a simple control algorithm
3. test the robot and the algorithm,
4. evaluate and draw conclusions → Report

Team organization:

• robot builder: 1,2 persons,
• algorithm development: 1,2 persons.

Caution !:

## Robot building

(Builing team)

• Build a simple mobile robot i.e. according to QuickStart, your invention here is welcomed.
• Connect desired sensors on the front or side of the robot (i.e. sonar)

## Algorithm development

(Control team)

• program simple control algorithms (1-2)
• use 1 or 2 sensors
• save project files

## Proposed Algorithms:

### Patrol

• robot drives on its (given) way (square, circle, triangle)
• repeats this way N times
• robot stops after finding an obstacle (touch or distance sensor)
• plays beep signal
• backs up

### Avoidance

• robot drives straight
• after reaching an obstacle (use sonar) it tries to avoid it
• plays beep signal
• make a right turn

### Tracking

• robot follows up a light source

• control the robot by voice signal (e.g. clapping) or touch
• example: one clap - start, two claps - stop

## Integration

Test the algorithm on the constructed robot. Please, remember that after uploading program to the robot you can disconnect USB wire and let it go on the desk or floor.

## Finish

CAUTION: do it slowly and carefully - damage is much easer during disassembly then while assembling.

## Report

Prepare a short report describing what you have accomplished during this exercise:

• what was the purpose of the robot,
• what sensors did you use and why,
• include a photo of your robot,
• include a screenshot of your program,
• describe problems and difficulties you had.

★ Lab instructions translated/enhanced by Igor Wojnicki, PhD (2010).