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

Jeżeli jesteś za filtrem sieci web, prosimy, upewnij się, że domeny *.kastatic.org i *.kasandbox.org są odblokowane.

Główna zawartość

Budujemy robota-mrówkę

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.
Krok 1: Insert beams as follows (to support motor)
Krok 2:  Attach motors.
Krok 3: Add support using 11 hole beam and 2 pegs.
Krok 4: Attach wheels (simple using 5,5 stopper axle).
Krok 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:
  • Pętle
  • 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.

Chcesz dołączyć do dyskusji?

Na razie brak głosów w dyskusji
Rozumiesz angielski? Kliknij tutaj, aby zobaczyć więcej dyskusji na angielskiej wersji strony Khan Academy.