Linear Actuator

We already learned about one actuator - the pen.

Actuator means an electronic device that can act on its environment, usually in the form of:

Robots use actuators like motorized wheels to move, motorized arms, LEDs or lights and speakers to interact with their environment.

Our robot already has wheels.

Let's add a Linear Actuator!

What is a Linear Actuator?

A Linear actuator is a motorized device that moves in a linear fashion - in a line. Back and forth. As opposed to most, which move in a circle or a rotational manner.

This kind of device can be very useful for:

Try Our Forklift Robot!

Enter this Gearsbot world to test out a Forklift Robot.

You can use the Joystick to drive it around like usual. But notice that we now also have a forklift linear actuator on the front of the robot. If we want to move it, we need to use the motor it's attached to - motorC (A & B are being used for the two wheels).

Notice we now have two new Motor Blocks.

These blocks can control single motors indepdently. Note that linear actuators that use DC or Stepper motors like the ones we have in GearsBot require more rotations to move a small distance compared to wheels.

For instance let's try this code:

Run the code - what does it do?

Challenges

Test 1

Test 2

Test 3

Computational Thinking Hints

Remember some of the processes that can help you think like a robot:

Decomposition - Break the problem down into little bits

You need:

Abstraction

Write functions for the above blocks so your code will be easy to read, follow, and change.

Once you have that you can forget about all the numbers and details of those blocks.

This will be very useful, because the algorithm for the last challenge is quite long & complicated.

Pattern Recognition

Useing the Forklift just means making a motor turn and translating that to a linear movement. The more you turn the forklift motor, the higher (or lower) the forklift moves...

Note that you will lift the forklift off the ground, but lower it to the table's height. So it isn't just the reverse of one another...

So, it's not the same amount of motor turns.

Algorithmic Thinking

Try to write down in English what you need to do:

This is the plan... whoo! It's quite long...

GOOD LUCK!