LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:

Slides:



Advertisements
Similar presentations
Robofest 2005 Introduction to Programming RIS 2.0 RCX Code.
Advertisements

While Loops and If-Else Structures
EN Engenharia Unificada I Utilizando o LEGO Mindstorms Centro de Engenharia, Modelagem e Ciências Sociais Aplicadas.
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.
LabView Basics.
Sensors.
VEX and Robot C Chris Patterson Presented by Modified by J. Andazola.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Mine Mapping Choose a Sensor.
RobotC Programming for LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:
IR SENSORS AND ENCODERS. LCDs Timothy Friez Class # 2.
Introduction to Sensors
EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Robotics Day4.
Introduction to NXT Software and Functionality Bot’oberfest October 15, 2007.
1 ©2006 INSciTE Lab Two Task: Make the program from Lab One (Move forward 5 rotations and turn right 90 degrees) into a MyBlock.
The NXT is the brain of a MINDSTORMS® robot. It’s an intelligent, computer-controlled LEGO® brick that lets a MINDSTORMS robot come alive and perform.
EG1003: Introduction to Engineering and Design Sensors.
LEGO Mindstorms NXT Introduction. Component NXT Brick Touch Sensor Light Sensor Ultrasonic Sensor Interactive Servo Motors MMN Lab.
Adapted for STLP Camp ‘10 STLP Robotics Camp June 3 & 4.
Computer Science Lego Robotics Lab 07 Page 51. CS Lego Robotics Lab 07 (Updated ) Objectives: 1.Extend the Lego robot with three sensors. 2.Program.
Programming Concepts Part B Ping Hsu. Functions A function is a way to organize the program so that: – frequently used sets of instructions or – a set.
GIRLS Robotic Camp. Let’s Begin Meet and Greet – Camp leaders introduce themselves – Students introduce themselves.
Unit 5 – “Watch Out!”. Introduction New Topics Case Structures New Functions Less? Comparison Function Ultrasonic Sensor.
Adapted for STLP Camp ‘09 Mobile Robots Why do robots need to move?
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
EN Engenharia Unificada I PROGRAMANDO O LEGO MINDSTORMS Centro de Engenharia, Modelagem e Ciências Sociais Aplicadas.
ROBOTC Training Session 1 Timothy Friez 1/10/08 Revision 1.
Default_Routine(); - PWM Mapping /******************************************************************** * FUNCTION NAME: Default_Routine * PURPOSE: Performs.
Overview: The goal of this lesson is to transition from discussing robots in general to the specifics of NXT robot. Objectives: Students will be able.
Sentry System Multiple Sensors
Clap On, Clap Off Introductory Presentation. Opening Activity What is a sensor? Can you give examples? ?
By Eric Greene RMS / I. S. 192 Q. Smart Start Question How would you get the robot to flirt with disaster by touching the edge of the “table” as many.
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.
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
EG1003: Introduction to Engineering and Design Laboratory 4: Sensors.
VEX and Robot C Chris Patterson Frisco ISD CTE Center Presented by.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
DPS Secondary Science Institute 1 Agenda 8:30-8:45 Introduction and Overview 8:45-9:15 The Bumper Car 9:15-10:15 The Line Follower 10:15-10:30 Questions.
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.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Sentry System Integration.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Sentry System Two-Way Communication.
Python Programming Module 4 Sensors and Loops Python Programming, 2/e1.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
EV3 Attachments and Sensors. Ultrasonic Sensor  Purpose: detect distance from an object.  What it does: Generates sound waves and reads their echoes.
NXT Mindstorms Kit Programming
Exploring Computer Science Lesson 6-5
By Sanjay and Arvind Seshan
Introduction To Programming with LEGO NXT 0
Introduction To Programming with LEGO NXT 2
RobotC Sensors.
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
Introductory Presentation
Exploring Computer Science Lesson 6-5
BEGINNER PROGRAMMING LESSON
BEGINNER PROGRAMMING LESSON
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
RobotC Programming for LEGO Mindstorms NXT
Compiled from various Internet sources Presented by Mr. Hatfield
Obstacle Detection.
While Loops and If-Else Structures
Lego MINDSTORMS EV3.
Oregon Robotics Tournament and Outreach Program
While Loops And If-Else Structures
LEGO MINDSTORMS NXT PROGRAMMING
Presentation transcript:

LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:

Sensors

Sensors and Motors Four sensor ports –Sonar –Sound –Light –Touch Three motor ports –Each motor includes rotation counter

Touch Sensors Education kit includes two sensors Much more robust than old RCX touch sensors

Light Sensor Reports light intensity as percentage Two modes –Active –Passive Practical uses –Identify intensity on paper –Identify lit objects in dark room –Detect shadows

Sound Sensor Analogous to light sensor –Reports intensity –Reputed to identify tones We have little experimented with this Practical uses –“Clap” to signal robot

Ultrasonic (Sonar) Sensor Reports distances –Range: about 5 cm to 250 cm –In practice: Longer distances result in more missed “pings” Mostly reliable –Occasionally gets “stuck” –Moving to a new location helps in receiving a sonar “ping”

Using Joysticks To control your robot using a joystick axis or a button, use these functions frcRF[port] – gets the value from a joystick axis –[port] – p1_y, p1_x, p1_wheel, … p2_x,…p3_x, etc. frcOIJoystickButtons[port] –[port] – oiButtonPort1Button1 through oiButtonPort4Button4

Using Loops A Loop will help a portion of your code execute repeatedly, until told to stop. while(true == true) { motor[port1] = frcRF[p1_y]; motor[port2] = frcRF[p2_y]; } This code will cause the motors to respond to the joystick values forever. –The loop reads (while true is equal to true)

Analog Sensors Very easy to read analog sensor values –SensorValue[port] –[port] = in1,in2,in3 … in16 while(SensorValue[in1] < 10) { motor[port1] = frcRF[p1_y]; motor[port2] = frcRF[p2_y]; } This program will run until an analog sensor on port 1 sees a value of less than 10. Analog sensor values can range from 0 to 1023

Digital Sensors Digital sensors are a little more complex –First you have to decide if you want the sensor port to be an input or output –frcDigitalIODirection[port] = condition; port – pio1, pio2, pio3, … pio18 condition – dirInput or dirOutput –Second you have read or assign the value –frcDigitalIOValue[port] If an input, this will read the value (either a 1 or 0) If an output, you can assign the value using a 1 or 0. –frcDigitalIOValue[port] = 1; // turns on the digital output port

ROBOTC for IFI – Version 1.14 New ROBOTC version –Has built in support for: encoders, accelerometer, gyro sensor, OI LEDs and more! Make sure to upgrade!

IR Board Review Rule Clarification from Team Update #3 –4 Signals Allows –4 Signals = 4 actions –Signals must repeat when the same button is pressed.

Operator Interface LEDs 11 LEDs installed on Operator Interface –7 Green –4 Red User Controllable with ROBOTC

Controlling the LEDs New ROBOTC function –frcOILEDs[LED] = true or false Examples –frcOILEDs[oiLEDPWM1_Green] = true; Turns on PWM1 Green LED –frcOILEDs[oiLEDPWM1_Green] = false; Turns off PWM1 Green LED