3
51 TETRIX ® Getting Started Guide Lessons Lesson 2: (Optional) Joystick Driving Programming Guide (ROBOTC ® ) Objective: In this guide, the motors and joystick will be configured for the ROBOTC ® programming software. Selecting the Platform Type: 1. To launch ROBOTC, find ROBOTC in the program files list in the Start menu and click it. Once ROBOTC opens, click the Robot pull-down menu and navigate to the Platform Type section. Select LEGO ® MINDSTORMS ® and then select LEGO MINDSTORMS NXT + TETRIX ® . Opening and Compiling a File: 2. Open and compile the ROBOTC file for Lesson 2. a. On the DVD, navigate to Lessons and select Lesson 2. b. Then under Resources on the left side, click on Programming. c. Under Programming, select Sample Programs and click on (Optional) Joystick Driving (ROBOTC). Note: Depending on the browser configuration, the file may prompt to save the file to disk or open directly in ROBOTC. d. If the file does not open in ROBOTC, then return to ROBOTC and select Open and Compile, then locate and select the L2_joystickControl.c file. Click the Open button.

Lessons TETRIX Getting Started Guide - Tetrix … Lessons TETRIX® Getting Started Guide Lesson 2: (Optional) Joystick Driving Programming Guide (ROBOTC®) Objective: In this guide,

  • Upload
    lamkien

  • View
    261

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Lessons TETRIX Getting Started Guide - Tetrix … Lessons TETRIX® Getting Started Guide Lesson 2: (Optional) Joystick Driving Programming Guide (ROBOTC®) Objective: In this guide,

51

TETRIX® Getting Started GuideLessons

Lesson 2: (Optional) Joystick Driving Programming Guide (ROBOTC®)

Objective:

In this guide, the motors and joystick will be configured for the ROBOTC® programming software.

Selecting the Platform Type:

1. To launch ROBOTC, find ROBOTC in the program files list in the Start menu and click it. Once ROBOTC opens, click the Robot pull-down menu and navigate to the Platform Type section. Select LEGO® MINDSTORMS® and then select LEGO MINDSTORMS NXT + TETRIX®.

Opening and Compiling a File:

2. Open and compile the ROBOTC file for Lesson 2.a. On the DVD, navigate to Lessons and select Lesson 2.

b. Then under Resources on the left side, click on Programming.

c. Under Programming, select Sample Programs and click on (Optional) Joystick Driving (ROBOTC).

Note: Depending on the browser configuration, the file may prompt to save the file to disk or open directly in ROBOTC.

d. If the file does not open in ROBOTC, then return to ROBOTC and select Open and Compile, then locate and select the L2_joystickControl.c file. Click the Open button.

Page 2: Lessons TETRIX Getting Started Guide - Tetrix … Lessons TETRIX® Getting Started Guide Lesson 2: (Optional) Joystick Driving Programming Guide (ROBOTC®) Objective: In this guide,

52

LessonsTETRIX® Getting Started Guide

Lesson 2: (Optional) Joystick Driving Programming Guide (ROBOTC®)

Configuring Motors and TETRIX® Controllers:

3. Navigate to the Robot menu and select Motors and Sensors Setup.4. Select the TETRIX® Controllers tab.5. Under Controller Configuration Type, select Standard Configuration. One motor controller, one servo controller on sensor

port S1.

6. Click the Motors tab.7. Under Type for motorA, motorB, and motorC, select No motor from the pull-down menu.8. For MotorD, select the box under Reversed.

9. To apply the changes, click Apply and then click OK.

Connecting the NXT Brick and the Joystick to the Computer:

10. Plug the joystick into a USB port on the computer.

11. Connect the NXT brick to the computer. This can be done by connecting the NXT Brick to the computer with a USB cable or with Bluetooth®.

Note: For more information about connecting to the NXT brick, consult the NXT Brick Guide on the TETRIX Getting Started Guide DVD.

12. Navigate to the Robot menu and select Compile and Download Program.

Page 3: Lessons TETRIX Getting Started Guide - Tetrix … Lessons TETRIX® Getting Started Guide Lesson 2: (Optional) Joystick Driving Programming Guide (ROBOTC®) Objective: In this guide,

53

TETRIX® Getting Started GuideLessons

Lesson 2: (Optional) Joystick Driving Programming Guide (ROBOTC®)

13. Open the Program Debug pop-up and click the Start button.

14. Return to the Robot menu. Hover over Debug Windows and select Joystick Control – Simple.

15. Use the joystick to control the robot. Move the left thumb stick forward and back to move motorD. Move the right thumb stick forward and back to move motorE. The motors should rotate in the forward direction when the thumb stick is pushedforward.