If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Electrical engineering>Unit 8

Lesson 4: Ant bot

# Building ant bot

Let's build an ant colony!
First we need to build a single ant. Let's start with a simple design and focus on the programming of the ant.
Goal: Build a robot which can mimic basic ant walking & running behavior.
Specifications: Your robot is allowed to "see" using an ultrasonic sensor. It should follow these rules (rough guide):
• If object < 7 inches, then move backwards fast (50% power)
• If object < 12 inches, then move backwards slow (30% power)
• if object is within 12-15 inches, then freeze
• if object is > 15 inches, then move forwards slow (30% power)
• if objects  > 30 inches, then move forwards fast (50% power)

## 5 minute construction

Feel free to follow this easy 5 minute construction to get your robots running as fast as possible. Or, make your own! You can always build off this design later.
Step 1: Insert beams as follows (to support motor)
Step 2:  Attach motors.
Step 3: Add support using 11 hole beam and 2 pegs.
Step 4: Attach wheels (simple using 5.5 stopper axle).
Step 5: Add 3x3 joiner (or wheel) to raise back (so sensor is looking flat ahead) and attach ultrasonic sensor
.
The next video will show the final steps as well as a completed robot.

## Tips

To build ant bot you will need to be familiar with:
• Loops
• Nested switch statements
• Move blocks
You can review these concepts below. After watching these videos you should be ready to solve this problem.
First you should draw your solution on paper as it will involved nested switch blocks.

## Want to join the conversation?

• Can the ant bot be modified?
• yes! the idea here is that the ant is a starting point for you to jump off from.
• can you use a different type of program than the NXT mindstorm program? Like the newer one.
• All parts are included in Ev3 except the Ultrasonic sensor.
• Where can I find everything to make this?
• In the Nxt Lego kit, which can only be found online I'm pretty sure. \/('_')\/
• this is just the beginning of LEGO NXT there are sooooo many
possibilities of other stuff to make like I have made:
a humanoid robot, the destroyer of destroyers(battle robot) and MANY more
all with a NXT
my question is:
are you gonna make videos for the more advanced NXT robots?
because this is the most basic robot building
• To tell u the truth, I'm using EV3, not NXT.
(1 vote)
• what are the instrument used to build the robot?
(1 vote)
• can I watch a video so it can show me and explain?
(1 vote)
• where are we to get the tools
(1 vote)