intro to programming
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 PresentationTRANSCRIPT
![Page 1: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/1.jpg)
Intro to Programming
![Page 2: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/2.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/4.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/5.jpg)
Connecting to your robot
• USB– Connect cord
• Bluetooth– Robot• NXT Brick
– Communication Link Setup» Search
• Connect
![Page 6: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/6.jpg)
Firmware
![Page 7: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/7.jpg)
RobotC Programming Enviornment
![Page 8: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/8.jpg)
RobotCPragmas and Includes
![Page 9: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/9.jpg)
RobotCInitialization
![Page 10: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/10.jpg)
RobotCTask Main
![Page 11: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/11.jpg)
RobotCPragmas and Configuration
• Controllers– Motors– Sensor– Servos
• Wizard– Robot• Motor and Sensor setup
– Controllers, Motors, Sensors, Servo
![Page 12: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/12.jpg)
RobotCProgramming Autonomous Mode
![Page 13: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/13.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/14.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/15.jpg)
Buttons
• Every button has a number
![Page 16: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/16.jpg)
TopHat
![Page 17: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/17.jpg)
Triggers
![Page 18: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/18.jpg)
Joysticks
![Page 19: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/19.jpg)
RobotCMovement and Encoders
![Page 20: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/20.jpg)
RobotCProgramming sensors
• Types– Lego• Light, Color, Touch, Sound, Ultrasonic
– HiTechnic• Gyro, Accelerometer, Magnetic, Force, IR, Compass
![Page 21: Intro to Programming](https://reader036.vdocuments.us/reader036/viewer/2022062521/56816779550346895ddc7868/html5/thumbnails/21.jpg)
Connecting to your robot cont…
• Wi-Fi– Robot• NXT Brick
– Communication Link Setup» Search
• Connect