intro to programming

21
Intro to Programming

Upload: jaunie

Post on 23-Mar-2016

44 views

Category:

Documents


3 download

DESCRIPTION

Intro to Programming. Programming in FTC . Modes of the game Autonomous Robot moves by itself Tele-op and End Game Robot responds to controls The two languages allowed RobotC LabVIEW. RobotC. Similar to C programming Text based For Help: www.robotc.net/forums Pros Compiles faster - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Intro to Programming

Intro to Programming

Page 2: Intro to Programming

Programming in FTC

Modes of the game• Autonomous– Robot moves by itself

• Tele-op and End Game– Robot responds to controls

The two languages allowed• RobotC• LabVIEW

Page 3: Intro to Programming

RobotC

• Similar to C programming– Text based

• For Help: www.robotc.net/forums• Pros– Compiles faster– Smaller code

• NXT can hold more programs

• Cons– Harder to multitask– Doesn’t come with kit

Page 4: Intro to Programming

LabVIEW• Similar to NXT-G

– Graphics based• For Help: http://forums.ni.com/t5/LabVIEW-for-LEGO-MINDSTORMS-and/bd-p/460

• Pros– Easier multitasking– More visual– Comes with kit

• Cons– Takes longer to compile– Larger code – Takes up more space on computer itself

Page 5: Intro to Programming

Connecting to your robot

• USB– Connect cord

• Bluetooth– Robot• NXT Brick

– Communication Link Setup» Search

• Connect

Page 6: Intro to Programming

Firmware

Page 7: Intro to Programming

RobotC Programming Enviornment

Page 8: Intro to Programming

RobotCPragmas and Includes

Page 9: Intro to Programming

RobotCInitialization

Page 10: Intro to Programming

RobotCTask Main

Page 11: Intro to Programming

RobotCPragmas and Configuration

• Controllers– Motors– Sensor– Servos

• Wizard– Robot• Motor and Sensor setup

– Controllers, Motors, Sensors, Servo

Page 12: Intro to Programming

RobotCProgramming Autonomous Mode

Page 13: Intro to Programming

RobotCDrive Trains

• Tank Drive– Left Joystick Left drive train– Right Joystick Right drive train

• Arcade Drive (think Playstation)– One Joystick Throttle– Other Joystick Steering

Page 14: Intro to Programming

RobotCProgramming the joystick controllers

• 2 Joystick controllers– One is joy1 other is joy2

• 4 sections of the controller– Buttons, TopHat, Triggers, and Joysticks

Page 15: Intro to Programming

Buttons

• Every button has a number

Page 16: Intro to Programming

TopHat

Page 17: Intro to Programming

Triggers

Page 18: Intro to Programming

Joysticks

Page 19: Intro to Programming

RobotCMovement and Encoders

Page 20: Intro to Programming

RobotCProgramming sensors

• Types– Lego• Light, Color, Touch, Sound, Ultrasonic

– HiTechnic• Gyro, Accelerometer, Magnetic, Force, IR, Compass

Page 21: Intro to Programming

Connecting to your robot cont…

• Wi-Fi– Robot• NXT Brick

– Communication Link Setup» Search

• Connect