Programming - Motion Intro to Robotics. Motors and Sensors Setup The first thing we need to do is tell ROBOTC that we have motors on our robot. Choose.

Slides:



Advertisements
Similar presentations
Manual Software Upgrade Guide ◆ Notice 1. Use the full model name of TV when manually downloading software updates. Ex) 47LX9500-UA : The Full model name.
Advertisements

Jason Howard. Agenda I. How to download robotc II. What is tele-op used for? III. How to build a basic tele-op program IV. Getting the robot to drive.
Lab7: Introduction to Arduino
Automation and Robotics
Developed in collaboration with Introduction to Programming.
Robot C Ready, SET, Go! Workshop SDSU, Fall 2013.
Autonomy using Encoders Intro to Robotics. Goal Our new task is to navigate a labyrinth. But this time we will NOT use motor commands in conjunction with.
LEGO Robotics Lecture 1: Getting acquainted with your robotic environment.
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Programming in easyC.
RobotC Programming for LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:
CS 1 with Robots IDLE and Myro Institute for Personal Robots in Education (IPRE)‏
RobotC For Beginners Tyler Lutz and Keaton Bonds DRSS Enterprise.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Testbed: Exercises.
What is RobotC?!?! Team 2425 Hydra. Overview What is RobotC What is RobotC used for What you need to program a robot How a robot program works Framework.
How to Download and Install a Sharp Print Driver on a Mac.
Program ultrasonic range sensor in autonomous mode
ROBOTC Training Session 1 Timothy Friez 1/10/08 Revision 1.
7.2 V battery pack and charger Put the battery in the charger station at the end of the lab. period. Red light indicates charging. Ken Youssefi Introduction.
EV3 Workshop Oct 3, 2015 Instructor: Chris Cartwright
The George Washington University Department of ECE ECE 1010 Intro: Electrical & Computer Engineering –Introducing KIPR Link/Interface and Set-up –Continuation.
Programming Design ROBOTC Software Principles of Engineering
Robot C and Natural Language
Autonomy using Encoders Intro to Robotics. Autonomy/Encoders Forward for Distance In this unit, you will learn to use the encoders to control the distance.
Change in your CAD Project File - it happens all the time in robotics.
Available at: Lesson 3.5 – Program Light Sensor in Autonomous Mode Program Light Sensor in Autonomous Mode.
Vex Robotics Program six: combining autonomous and radio control.
AUTOMATION WITH ROBOTC Starting to write and troubleshoot computer code.
Getting Started in RobotC // Comment task main() motor[] {} wait1Msec() ; = Header Code Compile Download Run Take out your notes.
ROBOTIC ARM 2 Wilmer Arellano © Hardware  Next slide shows sensor connection to analog pin 0 and Motor 1 connection. Lecture is licensed under.
Vex Robotics Program four: reversing and turning.
Automated Mechanisms Help. Potentiometers Potentiometer Check –Analog Port 2 How they work –Analog sensor –Measures rotation of a shaft between 0 and.
Programming your Robot
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
Vex Robotics Program Two: Using two motors. Program two: using the motors In the last section, you learned how to turn on one motor. Now, you will take.
Automation and Robotics.  First you select the platform type so that you can use Natural Language PLTW.
Vex Robotics program three: using motors and sensors together.
Mechanical Components and Programming Ken Youssefi Introduction to Engineering – E10 1.
Testbed Coding In this activity you will code different challenges for the Testbed. For each challenge a sample program is shown. Use what this sample.
Bot Shop Jane Taylor Dee Wallace Robot C For Vex.
Testbed Coding In this activity you will code different challenges for the Testbed. For each challenge a sample program is shown. Use what this sample.
After Construction Name: Per #:.
INTRODUCTION TO ROBOTICS Part 5: Programming
ClawBot Beginning Programing.
Introduction to Programming
Robotics Programming Using Shaft Encoders
StartStruck in a Virtual World
Automation and Robotics
StarStruck in a Virtual World: Fantasticbot Version
Programming Design ROBOTC Software Computer Integrated Manufacturing
Basics for Robotics Programming
Programming - Motion Intro to Robotics.
Movement using Shaft Encoders
Autonomy using Encoders
Getting Started in RobotC
By Willem Scholten Learning Access Institute
Automation and Robotics
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Getting Started in RobotC
Programming - Buttons Intro to Robotics.
Automation with RobotC
Robotics Programming Using Shaft Encoders
Programming - Buttons Intro to Robotics.
Robotics Programming Using Shaft Encoders
Aeroponic Engineering and Vertical Farming
RobotC Programming for LEGO Mindstorms NXT
Automation with RobotC
Robotics Programming Using Shaft Encoders
Programming Design ROBOTC Software Principles of Engineering
Presentation transcript:

Programming - Motion Intro to Robotics

Motors and Sensors Setup The first thing we need to do is tell ROBOTC that we have motors on our robot. Choose ROBOT, then MOTORS AND SENSORS SETUP.

Motors and Sensors Setup You will notice that there are THREE tabs. One for Motors, Analog Sensors, and Digital Sensors. Choose the Motors Tab. In port 2 “Name” type in Rmotor and for ports 3 type in Lmotor. Then select MOTOR EQUIPPED from the type drop down menu. Click APPLY, then OK.

Motor Command The motor command tells the robot to run a motor at a given power level. The example below sets the motor on port 3 to run at full power forwards. Remember, every command ends with a semicolon.

Wait Command The comment wait1Msec tells the robot to wait before it executes the next command, for a given time in milliseconds. The value in parenthesis is the amount of time you want the robot to wait. 3000Ms is equal to 3 seconds.

Let’s Begin You will notice that at the top there are PRAGMA statements. These are automatically generated configuration statements and will ALWAYS be at the very top of the program.

Let’s compile If it asks you to save, call it motion lesson 1. WHAT HAPPENED?

Compile Errors Errors have different colors and are displayed next to the code line number where there is a problem. Here we see a problem in line 9. Errors are explained in a little bit more detail below. If you have no errors, then the program compiled correctly.

Compiled Correctly

Attaching to a PC Use a USB cable to connect the robot to the PC. It is often an ORANGE cable. Turn the Cortex on.

Check the platform type

Check the download method

Compile and download Possible errors: Cortex power on? If not, RobotC may ask you to turn on the battery. Can’t find the COM port? If not, unplug the USB cable with the cortex powered on, then re-insert and try again.

What happened????

Motors and Sensors Setup

Check here! (or port 3?) RobotC will make the change in the #PRAGMA statement.

Modify this code. Since we are moving at half power lets double our time.

Modify the code, then compile and download. Note what happens.

Modify the code below, then compile and download each time. Note what happens.

Manual Straightening To compensate for the differences between the motors, we could either speed up the slower motor or slow down the faster one. Let’s slow down the faster one.

Save your code Save the code with a filename you will remember in your MY DOCUMENTS folder.

Challenge Using what you have learned, write a program that will allow you navigate the labyrinth in the arena. You MUST use comments to explain in the code what you are doing. Place group member names in the comments at the bottom of the code.