LEGO Robotics Lecture 1: Getting acquainted with your robotic environment.

Slides:



Advertisements
Similar presentations
1chung 5 th Annual Robofest 2004 Informational Meeting Mar. 20, 2004 Chan Jin Chung Ali Khazaal Jason Lo Computer Science Lawrence Technological University.
Advertisements

Robofest 2005 Introduction to Programming RIS 2.0 RCX Code.
Chung for Robofest 05 1 Introduction to RoboLab CJ Chung Lawrence Technological University.
Each team has their own: a.Laptop computer b.LEGO NXT robot c.USB cable d.Light paper on the table to test the robot Sit Down in Teams of 2.
Getting started with LEGO NXT Mindstorms software This is intended to be a short introduction to the LEGO Mindstorms software and programming the LEGO.
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.
Coding and Debugging. Requirements and Specification Recall the four steps of problem solving: Orient, Plan, Execute, Test Before you start the implementation.
How Do You Make a Program Wait?. 1. What is an algorithm? 2. Can you think of a reason why it might be inconvenient to program your robot to always go.
Graphical RobotC NXT (EV3) Robot Workshop 2015 Instructor: Dr. Fred Brauchler Assistant: Chris Parker 2/7/2015Lawrence Technological University1.
VEX and Robot C Chris Patterson Presented by Modified by J. Andazola.
A CTIVITY M OVEMENT TASK USING SENSORS - HUMANS AND ROBOTS (75 MINUTES ) 1.
Navigating the BOE-BOT
Robot C Ready, SET, Go! Workshop SDSU, Fall 2013.
V EX C OACHES ' T RAINING October 12, Agenda for Today 9 – 10 AM : Tina Reeves and the Engineering Notebook 10 – Noon : Finish Building, Basic Robot.
Alternative Programming Languages Myles McNally LMICSE Workshop November , 2004 University of Mississippi.
RobotC Programming for LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:
Not Quite C: A CS 0 Option LMICSE Workshop June , 2005 Alma College.
An Intro to Robots and Computer Programming
1 An introduction to programming concepts with Scratch.
Tasks An NQC program consists of at most 10 tasks. Each task has a name. One task must have the name main, and this task will be executed. The other tasks.
Repeating Blocks of Code (updated 9/20/05 7:35pm) Reference NQC Tutorial pp 9-12.
LEGO Mindstorms NXT Programming We will be using the Common Palette for our Robots This is how you download your program onto the brick Drag and drop a.
How to turn on the robot How to start Bluetooth How to connect to robot How to initialize the robot How to not break the robot Sec Getting Started.
Getting Started! Lego Mindstorms Program NXT 2.0.
Getting Started Sec 9-2 Web Design. Objectives The student will: Know to establish a Bluetooth link to the Scribbler robot. Know to start IDLE (the Python.
Reactive robots UPNA The Public University of Navarra Material for pupils & students.
EV3 Workshop Oct 3, 2015 Instructor: Chris Cartwright
Moving Around in Scratch The Basics… -You do want to have Scratch open as you will be creating a program. -Follow the instructions and if you have questions.
The George Washington University Department of ECE ECE 1010 Intro: Electrical & Computer Engineering –Introducing KIPR Link/Interface and Set-up –Continuation.
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.
Motors and Sound Troubleshooting Tips. © H-CCS Problem 1 Why can’t I download my program to the RCX?
Barclays Robot Challenge Learn how to Program Robots.
AUTOMATION WITH ROBOTC Starting to write and troubleshoot computer code.
Find the Mindstorms Icon on the computer.. To start a new program click go.
Minds and Computers 2.1 The RCX l Hitachi H8/3297 series processor l 3 inputs/sensors (1, 2, 3) l 3 outputs/motors (A, B, C) l 32k RAM/ 16k ROM ä 12 kB.
You will need Dev C++ to help you with this project. If you do not already have this programming tool on your device you can visit
Program Flow LabVIEW Robotics Fundamentals. Unintuition You know what this program does… So what does this one do? Inserted code.
Vex Robotics Program four: reversing and turning.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class3/Lab 2.
Oregon Robotics Tournament and Outreach Program RCX Basics.
EV3 Software EV3 Robot Workshop
Cloning in Scratch Computer App Session 6. Cloning in Scratch Learning Objectives: I will clone sprites in Scratch to create copies of an existing sprite.
ATI LEGO ROBOLAB Steps To Getting Started. ROBOLAB Introduction  Robots are built around the RCX programmable LEGO brick that is used to control motors.
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.
ROBOTC Software EV3 Robot Workshop
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
ROBOTC Software EV3 Robot Workshop Lawrence Technological University.
VEX and Robot C Chris Patterson Frisco ISD CTE Center Presented by.
Lesson 1: Motors and Sound Programming Solutions.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
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.
Lego Mindstorm Robots 9797 kit.  Students will learn how to identify how to detect a change in a condition.  Students will learn where and how to identify.
ROBOTC for VEX Online Professional Development. Homework Questions Thoughts? Questions?
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 #:.
How Do You Make a Program Wait?
By Sanjay and Arvind Seshan
Programming - Motion Intro to Robotics.
Automation and Robotics
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER PROGRAMMING LESSON
BEGINNER PROGRAMMING LESSON
ACTIVITY MOVEMENT TASK USING SENSORS - HUMANS AND ROBOTS (75 MINUTES)
Automation with RobotC
Automation with RobotC
Oregon Robotics Tournament and Outreach Program
Getting started with LEGO EV3 Mindstorms software
Downloading to the NXT requires the correct hardware setup
LEGO MINDSTORMS NXT PROGRAMMING
Presentation transcript:

LEGO Robotics Lecture 1: Getting acquainted with your robotic environment

Getting to know your Robotics Environment You will be using: –The parts in the kit build the bots –Computer write, compile and debug programs –The infrared (IR) tower Communicate with the brick –The RCX brick To power and control you robot

Programming Open program called “Bricx Command Center” –Select “COM1,” click “ok.” –Turn on the brick and place the IR sensor side of it facing the IR tower –Start a new file

For a list of commands, either hit the “F9” key or select View  templates from the menu bar The command list is very useful! Every command you might need is here. Now, we just have to learn how to use the commands!

Now some programming Write the following EXACTLY as it is written –Punctuation, upper/lower case, etc task main() { OnFwd(OUT_A); } –You could also insert the command OnFwd() without typing by finding it in the templates menu and clicking on it –What does this mean?? It will make more sense soon

Compiling (constructing) Many ways to compile: “F5” key, the compile menu, or this button If all is well, you will get no errors Errors appear here Most common error is a “parse error.” This means that you are not following the rules of the programming language There are many ways to upload: “F6,” the compile menu bar or this button (Brick must be on & facing tower). Selects which program slot (1-5) the program downloads to

Hooking up motors Using a wire, connect a motor to the “A” connector of the RCX brick The “program” key on the brick will cycle through the choice of programs to run. Select the program slot that you downloaded to On the brick click “run.” What happens???

Turn on two motors Write the following EXACTLY as it is written –Punctuation, upper/lower case, etc task main() { OnFwd(OUT_A+OUT_C); } Or you could use OnFwd(OUT_AC); –This time connect motors to A and C. Compile, –download and run like before. What happens?

Reverse motor direction 1) rotate connector orientation 180 degrees Or use –OnRev( ) command in place on OnFwd( )

Motor: starting and stopping Try this code: Task main() { OnFwd(OUT_A); Off(OUT_A); } Upload and run the program like before, correcting any errors.

Motor: starting and Stopping What happened? Run the program again and look carefully! Did the motor do what you thought it would do, or what you told it to do?

Ah, the computer is quick! The brick executes commands pretty quickly, so you saw the motor turn on for a very very short time and then turn off How can we tell the program to keep the motor on? –There are many ways to do this but lets try this command … Wait ("time"); Where “time” is a value in hundredths (.01) of a second Example –Wait(100) will pause for 1 second, or 100 hundredths of a second Time=.01sec*100 =1sec  “time is seconds” –Wait(1500) will pause for 15 seconds, or1,500 hundredths of a second Time=.01sec*1500 seconds=15sec  “time is seconds”

Now modify your program using the wait command in the appropriate place Make the motor turn on for 5sec, and then turn off. Did it work?

Task for the day: Build a robot –Your choice of how to build it –Focus on functionality and simplicity, not looks! From a starting point, program your robot to: –Drive forward and stop exactly 6 feet from the starting point as quickly as possible –Pretend that there is a little LEGO man 6 feet away and you want to really scare him, but not hit him. –You will compete with other teams for the closest distance without hitting the man. You may work on this with remaining time today and the majority of next class

Turn in for class credit Submit a copy of your program Plot the position, acceleration and velocity of the robot as a function of time. –Remember, position is how many feet the robot travels in a certain time, velocity how many feet/sec the robot travels in a second and acceleration is the change in velocity (think back to physics class freshman year!)