Presentation is loading. Please wait.

Presentation is loading. Please wait.

By Joshua Shaw.  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.

Similar presentations


Presentation on theme: "By Joshua Shaw.  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."— Presentation transcript:

1 By Joshua Shaw

2  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

3  Now lets make a servo operate with the flip of the joystick on the Joystick Controller  Go back to Joystick in the Function Block  Click and drag the Joystick to Servo function to your While Loop and place it on the vertical line between the JoystickToMotor function box and the lower bracket box 3

4  When you do this, another dialog box will appear  For our example program ◦ Lets set the Channel to “2” and the Motor to “4” ◦ This is done by click the down arrow besides each of the boxes ◦ Click OK 4

5  You will use the Channel 2 on the Joystick Controller  Move the right joystick up or down to control the servo  The servo will only move about 60º in either direction for a total of 120º 5

6  We will now create a servo program that operates with buttons instead of the joystick  Go to the Function Block  Under the Joystick folder  Click and drag the Joystick Digital to Servo onto the vertical line between the bracket boxes in the While Loop 6

7  The program for the servo in this example will look similar to the default  The difference is that the Servo # will be “3” and not “2”  Change the number by clicking on the down arrow  Then click on the “3” 7

8  The final program for the servo will look like this  Finally click OK 8

9 9  You will use the Channel 5 buttons on the Joystick Controller  Push the top left button to move the servo to the left  Push the bottom left button to move the servo to the right  When you let off of the button the servo will return to neutral  To change the direction of the servo, first release the button being pushed.

10  The next PowerPoint is Programming a Wheel System


Download ppt "By Joshua Shaw.  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."

Similar presentations


Ads by Google