Casne.ncl.ac.uk www.ncl.ac.uk/computing/ Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.

Slides:



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

RCX Workshop Day 2 Programming with Touch Sensor Light Sensor Repeat CJ Chung Associate Professor of Computer Science 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.
Follow The Guidelines Introductory Presentation. Opening Activity Make a prediction about how light sensors will use thresholds. Keep in mind: We used.
Automation and Robotics
Photos and Sensor Instructions
Using the NXT Light Sensor. 2 Connect One Light Sensor – 1 From My Files use Left / Right NXT buttons and get to View menu and push Orange button. From.
NXTG Workshop for Bottle RoboSumo Lawrence Technological University.
Intro to Robots Lab 6: Robot Behaviours. Intro to Robots Further Braitenberg Vehicles: Timid: –Moves forward in a straight line –One threshold light sensor.
CS 1 with Robots Robot Sensors & Actuators Institute for Personal Robots in Education (IPRE)‏
©2006 CSUC Institute for Research in Intelligent Systems Introduction to Coding June 15, 2006.
Microprocessors Tutorial 2: Arduino Robotics
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.
Embedded Programming and Robotics
Testbed: Exercises.
SNAP CIRCUITS INSTRUCTIONS 1.Make sure ALL parts are in place before beginning 2.Follow the Projects in order, starting with #1 3.The BLACK numbers show.
Open and Closed Loops Standard Grade Computing Studies.
Program ultrasonic range sensor in autonomous mode
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.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
Available at: Lesson 3.6 – Program Line Follower in Autonomous Mode Program Line Follower in Autonomous Mode.
Today’s Agenda 1.Scribbler Program Assignment 1.Project idea due next class 2.Program demonstration due Wednesday, June 3 2.Attendance & lab pair groupings.
EV3 Workshop Oct 3, 2015 Instructor: Chris Cartwright
L ILY P AD T RAINING C ENTENNIAL E LEMENTARY 2012 Material by Linz Craig Revision by Sarah Bloms Additional images by Modkit & Adam Meyer.
Default_Routine(); - PWM Mapping /******************************************************************** * FUNCTION NAME: Default_Routine * PURPOSE: Performs.
Available at: Lesson 3.5 – Program Light Sensor in Autonomous Mode Program Light Sensor in Autonomous Mode.
Technical Writing for Robotic Coding!.  du/products/teaching_robotc_cort ex/fundamentals/introtoprogramm ing/thinking/videos/fundamentals.
Sentry System Multiple Sensors
Find the Mindstorms Icon on the computer.. To start a new program click go.
Photos and Sensor Instructions
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4/Lab3.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class3/Lab 2.
By Droids Robotics INTERMEDIATE PROGRAMMING LESSON BRICK BUTTONS AS SENSORS.
1 ©2006 INSciTE Common Blocks. 2 ©2006 INSciTE Common Blocks Common blocks are full featured actions Like English statements Move Wait for an action Display.
SNAP CIRCUITS INSTRUCTIONS 1.Make sure ALL parts are in place before beginning 2.Follow the Projects in order, starting with #1 3.The BLACK numbers show.
Designing a Next-Generation Surgical Robot Activity.
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
Obstacle Detection. In the previous program the robot moves forward and then checks for something in the way. As we observed it only checks for things.
Automation and Robotics.  First you select the platform type so that you can use Natural Language PLTW.
ROBOTC for VEX Online Professional Development. Homework Questions Thoughts? Questions?
1 ©2006 INSciTE Lab Three Task: Move forward for 2 feet, turn right 90º repeat to complete a square path. End up exactly where you started.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
Introduction to Programming in RobotC
INTERMEDIATE PROGRAMMING LESSON
Follow The Guidelines.
Touch Sensor.
Finch Robot Class L4 How do I… ? LED color (Range 0 to 100)
Programming Part 2 Mod Kit
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
IMDL Summer 2007: RoBeDeS by David Ladolcetta.
INTERMEDIATE PROGRAMMING LESSON
Automation and Robotics
INTERMEDIATE PROGRAMMING LESSON
Sensors and Logic Switches
Follow The Guidelines Light Sensor
An Introduction to VEX IQ Programming with Modkit
Line Following Behavior
Switch Blocks check a value and choose a path based on that value
Introductory Presentation
Storing Values as Variables
Recap the basics Lesson 1.
Introductory Presentation
Line Following Behavior
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
Photos and Sensor Instructions
An Introduction to VEX IQ Programming with Modkit
Recap the basics Lesson 1.
Obstacle Detection.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Presentation transcript:

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 robot down when the motors are running 3.Lift the robot off the floor/desk to switch it off Make sure the robot is switched off before you connect it to the computer Only switch the robot on after disconnecting it from the computer Be careful connecting and disconnecting the Crumble controller – hold the controller or the robot NOT the battery pack Use speeds around 50%. Only use higher speeds if your robot does not move (or where there's space!). 1

casne.ncl.ac.uk Important notes Make sure the robot is switched off before you connect it to the computer Only switch the robot on after disconnecting it from the computer Be careful connecting and disconnecting the Crumble controller – hold the controller or the robot not the battery pack Use speeds around 50%. Only use higher speeds if your robot does not move (or where there's space!). Make CrumbleBot move forward and backward To move forward set motor 1 and motor 2 to FORWARD at the same speed for the same amount of time. 1.This program makes the CrumbleBot move forward at speed 50% for 1 second then stop – The delay at the start is to give time to position the robot after switching it on – Sometimes left and right motors are not exactly the same power. You may have to adjust speeds to move straight forward. 2.Now program the robot to move backward (REVERSE) 3.Program it to move FORWARD then STOP and then REVERSE back to where it started 2

casne.ncl.ac.uk Important notes Make sure the robot is switched off before you connect it to the computer Only switch the robot on after disconnecting it from the computer Be careful connecting and disconnecting the Crumble controller – hold the controller or the robot not the battery pack Use speeds around 50%. Only use higher speeds if your robot does not move (or where there's space!). Make CrumbleBot turn right and left To program the robot to turn right slowly, just power the left motor FORWARD and STOP the right motor – The left motor is motor 1 1.This program makes the robot turn right at speed 50% for 1 second and then stop 2.You can make faster right turns (and spins) by powering the left motor FORWARD and the right motor REVERSE – Try it! 3.Now try: – Turning left instead of right – Reverse turns – turning at the same time as moving backward 3

casne.ncl.ac.uk Important notes Make sure the robot is switched off before you connect it to the computer Only switch the robot on after disconnecting it from the computer Shine the CrumbleBot lights There are two LEDs (called sparkles) at the front of the CrumbleBot – LED1 on the left and LED2 on the right Make sure the D output of the controller is connected to the LEDs connector on the CrumbleBot Now you can light an LED 1.This program makes LED1 (sparkle 0) shine red for 1 second and then turns it off 2.Add blocks to the program to make LED1 switch on and off like an indicator – Use the do 10 times loop from the Control tab and change the number of times your code repeats – Use another wait after turning the sparkle off 3.Program LED2 (sparkle 1) in the same way 4

casne.ncl.ac.uk Important notes Make sure the robot is switched off before you connect it to the computer Only switch the robot on after disconnecting it from the computer Be careful connecting and disconnecting the Crumble controller – hold the controller or the robot not the battery pack Use speeds around 50%. Only use higher speeds if your robot does not move (or where there's space!). CrumbleBot Challenges 1.Program the CrumbleBot to make the following moves 2.Try some of your own Move forward then turn right to return in the direction it came from Do a full circuitTry a figure of 8 Move forward Stop Indicate left (flash left LED) Turn left Move forward Stop and indicate left here 5

casne.ncl.ac.uk The CrumbleBot has 2 line sensors at the front of the robot to detect a black line beneath the robot – A red LED indicates that a line has been detected by the left line sensor – A green LED indicates that a line has been detected by the right line sensor – If both indicator LEDs are on then the both sensors are above a line A digital line sensor outputs one of two values – HI means line detected – LO means no line is detected (or there is a reflecting surface) Make sure the left sensor is connected to input B and the right sensor is connected to input C Right sensor is connected to input C Now you can write programs that check the values of inputs B and C Using CrumbleBot line sensors 6 input B left line sensor input C right line sensor

casne.ncl.ac.uk Remember: – Input B is HI when a line is detected on the left – Input C is HI when a line is detected on the right The following tabs have some useful blocks for these tasks Program the robot to: 1.Move forward until a line is detected on the left 2.Move forward until a line is detected on the right 3.Move forward until a line is detected on the left OR the right 4.Move forward until a line is detected on the left AND the right (both sensors are over the line) 5.Move forward then turn right if a line is detected on the left 6.Repeat forever: move forward until a line is detected then move backward until the robot is off the line Experiment with your own ideas for what the robot should do when it detects a line. You can even use to randomize the robots behaviour. Line sensor programs 7

casne.ncl.ac.uk Follow that line With input B connected to the left line sensor and input C connected to the right line sensor, a simple line following algorithm is: Forever: If B is HI: turn left If C is HI: turn right Otherwise: move forward 1.Write a program to make the CrumbleBot follow the algorithm and follow a line – Remember, it is a good idea to have a delay at the start of the program so that you have time to switch the robot on – Line following can be used for a robot to find its way through a building 2.Can you write a line avoidance program? – Line avoidance can be used to keep a robot inside a room or "fenced" off area Remember the robot will turn if one motor moves forward while the other motor is either stopped or reverses. Changing the speed of FORWARD and/or REVERSE changes the speed and sharpness of a turn Remember the robot will turn if one motor moves forward while the other motor is either stopped or reverses. Changing the speed of FORWARD and/or REVERSE changes the speed and sharpness of a turn 8

casne.ncl.ac.uk The CrumbleBot has analogue left and right light sensors – they output a range a values from 0 to 255 (instead of binary HI or LO) – 0 is dark, 255 is very bright You can connect the sensors to inputs (e.g. B and C) and make your robot react to different light conditions, for example: to seek out dark or light areas or to follow a torch To start, write a program that turns towards the light (e.g. a torch or a brighter part of the room). With B connected to the left light sensor and C connected to the right light sensor: – Turn right (towards brighter side) when – Turn left when – The value 10 is called a threshold value. You may have to change the threshold value for your robot to detect differences in light conditions on the left or right. – Note: you can set variables to the analogue input values to see the light sensor values when the CrumbleBot is connected to the computer Follow the light! 9