+ All Categories
Home > Documents > Programming a Wheel System

Programming a Wheel System

Date post: 20-Feb-2016
Category:
Upload: deanna
View: 22 times
Download: 3 times
Share this document with a friend
Description:
Programming a Wheel System. By Joshua Shaw. From the last Power Points. We have previously added a While Loop We are now going to use it for programming the robot We have also added two motor programs An analog program A digital program We have also added two servo programs as well - PowerPoint PPT Presentation
13
Programming a Wheel System By Joshua Shaw
Transcript
Page 1: Programming a Wheel System

Programming a Wheel System

By Joshua Shaw

Page 2: Programming a Wheel System

We have previously added a While Loop We are now going to use it for programming

the robot We have also added two motor programs

◦ An analog program◦ A digital program

We have also added two servo programs as well◦ An analog program◦ A digital program

From the last Power Points

Page 3: Programming a Wheel System

3

One of the most commonly used wheel configurations is a wheel on each side of the robot

To avoid spinning in circles, the motors need to spin in opposite directions

The wheels need to work in unison, as well as being independent of each other

This can be achieved in an Arcade Program

Creating a Program for Wheels

Page 4: Programming a Wheel System

4

Go back to Joystick under the Functions Blocks Click and drag the Arcade - 2 motor anywhere

on the vertical line of the While Loop

Arcade Programming-Channels

Click the down arrow on the Forward\Reverse Channel to choose the channel that will operate the forward and backwards motion of the robot (select “3” for this program)

Do this for the Rotate Channel (select “4”)

Page 5: Programming a Wheel System

5

Click the down arrow on the Left Motor and select a motor to operate the wheels◦ For this example select

“6” Do this for the Right

Motor except with a different motor◦ For this example select

“8”

Arcade Programming-Motors

Page 6: Programming a Wheel System

6

To operate the wheels properly we will need to invert the direction of one of the motors◦ We will Invert Direction for Left Motor “6” by

clicking the down arrow of Invert Direction and selecting “1” If the robot goes backwards than we will return

Invert Direction of Left Motor “6” to “0” and select “1” under Invert Direction for Right Motor “8”

Finally click OK

Arcade Programming - Invert Direction of Motors

Page 7: Programming a Wheel System

7

This is what the program for the Arcade – 2 motor will look like

Completed Arcade Program

Page 8: Programming a Wheel System

8

You will use the Channels 3 & 4 on the Joystick Controller

Move the left Joystick in any direction to control the two motors

Both motors will run simultaneously

Using the Joystick Controller – Channel 3 and 4

Page 9: Programming a Wheel System

Another type of wheel system is the tank ◦ Uses two independent

wheel systems Drag and Drop Tank – 2

motor into the While Loop

As you can see it looks similar to the Arcade – 2 motor

Tank programs

Page 10: Programming a Wheel System

The primary difference between the Arcade program and the Tank◦ Arcade runs of one joystick◦ Tank runs of two joysticks

Each has an advantage◦ Arcade acts more like a computer game and is usually

easier to operate◦ Tank allows for more variation in turning capability and

precision of turns You can only use one or the other For this tutorial we will only use the Arcade

program for the wheels

Tank programs –v- Arcade program

Page 11: Programming a Wheel System

11

As you have probably notice, the motors of your robot give off a high pitch whining sound

This is due to the slight push on the joysticks from any number of forces◦ Slight breeze◦ Gravity◦ Slight push from the fingers

It is able to be fixed fairly easily

Noise Pollution

Page 12: Programming a Wheel System

12

You need one for each of the analog channels that where used In this example we used Channels 3 and 4 Drag and drop the Joystick Analog Deadband between the

Variable box and the While box Since we have a motor that is controlled by Channel 3 set the

Analog Channel to “3” Set both the Positive and Negative Deadband to “20” Click OK Drag and drop the Joystick Analog Deadband between the

Variable box and the While box Since we have a motor that is controlled by Channel 4 set the

Analog Channel to “4” Set both the Positive and Negative Deadbands to “20” Click OK

Reducing Noise for Channel 3 and Channel 4 Motors

Page 13: Programming a Wheel System

The next PowerPoint is Downloading and Testing the Program

Next PowerPoint


Recommended