You Turn the Wheel

The knowledgebase for 1675 members.

You Turn the Wheel

Objective

In this lab we will create a robot program that reads driver input and moves a robot part at a speed proportional to a joystick input.

Hardware

The hardware required for this lab is:

The setup should be as follows:

Software

What we need to do to accomplish the objective:

Create an Timedslice template project

If you don’t have a project, see Lab 1 on how to create one. If you still have your Lab 1 project, you can use that.

Write Code to Read the Joystick

The first step is to read the input value from a joystick on the joystick or controller.

What method or methods should our code to do this go in? Think about it or discuss with your group.

What code will you need to add? Here are some tips:

QUESTION TIME!

Write Code to Command the Motor Controller

How can you command the motor controller using your joystick input? Try scaling it down to 10-20% speed to start when controlling it manually.

Testing

When you test your code for the first time, always do it “on blocks”. No moving part of the robot should be touching the floor or anything else.

Post Lab Questions