Presentation on theme: "EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Sensors."— Presentation transcript:
EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Sensors
What is a Flowchart? Flow charts are diagrams that show a particular process from beginning to end. They are used by programmers to help build logical paths for robots/computers to follow, and also by businesses to help solve problems and improve efficiency. Flow charts can be used to provide a visual aid when describing any type of process.
Problem Solving Flowchart You fool! You poor fool!
Imagine flowcharting your day… According to studies, the average human makes about 612 decisions a day. This equals to 4,900 decisions in a week and 254,800 in a year.
This is used to represent an event which occurs automatically. Such an event will trigger a subsequent action, for example `receive telephone call’, or describe a new state of affairs. There must be a START and an END box. All flow paths should be between these. Start has 1 output and no inputs. End box has no outputs and 1 input. Rounded Box END START Alarm goes off
Used to represent a decision point in the process. Typically, the statement in the symbol will require a `yes’ or `no’ response and branch to different parts of the flowchart accordingly. Diamond END START Alarm goes off Hit the Snooze button? Yes No
END START Rectangle Alarm goes off Hit the Snooze button? This is used to represent an event which is controlled within the process. Typically this will be a step or action which is taken. Yes No Get out of bed Go back to sleep
END Fill it most of the way with water Get a Pot START Cook for 11 minutes, stirring occasionally Put it on the stove Turn on the burner Wait for the water to boil Get a Strainer Strain pasta from water. Put pasta on a plate. ENJOY YOUR PASTA. Linear Flowchart When boiling, add pasta
Fill it most of the way with water Get a Pot START Cook for 11 minutes, stirring occasionally Put it on the stove Turn on the burner Wait for the water to boil Get a Strainer Strain pasta from water. Put pasta on a plate. Non-Linear Flowchart Is the water boiling? Add pasta NO YES Do you like pasta? NO YES ENJOY YOUR PASTA Why did you make pasta then? THROW OUT THE PASTA AND ORDER A PIZZA
END INPUT SEQUENTIAL OUTPUT START DECISION YES NO Flowchart Basics
1 2 3 4 PC D C B A INPUT PORTS (Sensors) OUTPUT PORTS (Motors) Computer Connection B & C - Large Motors D - Small Motor SPEAKER USB PORTSD CARD SLOT The best use of sensors is with the Switch Flow Control block
Switches are used, primarily with sensors, to help a robot interact with its environment and make decisions. When the appropriate conditions are met, the robot will run the program in the CHECK box. If the appropriate conditions are not met, the robot will run the program in the X box. If, then statements… If the color sensor reads a blue color, then it will say “Blue”. If the color sensor does not read a blue color, then it will say “LEGO”.
Loops are used to repeat certain commands a definite or infinite amount of time depending on the setting. This can help save time and space in the program. In the program below, the robot will drive forward for 3 seconds at 50% power, then turn right at 30% power for 1 rotation. This will repeat for 4 times.
Sensors are used by robots to interact with its environment The best use of sensors is with the Switch Flow Control block Color / Light Sensor Gyroscopic Sensor Touch Sensor Ultrasonic Sensor
When the Touch Sensor is activated, it closes an electrical circuit which allows current to flow. If the sensor is released the circuit is broken and no current flows. The flow or lack of current is detected by the brick allowing it to know whether the sensor is pressed or not. The sensor has three modes: pressed and held pressed and released released
PORT VIEW Can measure distance in centimeters or inches. Features Distances measured up to 250 cm (~100-inch) Accuracy of +/- 1 cm (+/- 0.4-inch) Has the ability to recognize other ultrasonic sound (other robots) Sends an ultrasonic (rapid sound) signal out and receives back their echoes to help the robot determine the distance of objects.
PORT VIEW The Ultrasonic Sensor uses the speed that sound waves travel (341 m/s) to measure distance to an object. The sensor has two openings; one opening emits ultrasonic waves, the other opening receives them. The sensor measures the distance by timing how long it takes for an ultrasonic wave sent out by the emitter to bounce off an object and come back to the receiver. Distance to Object = *Wave has to travel to object and back. (Time Wave is Emitted) x (Speed of Sound) 2*
Used as assistance in stability of a robot. The mechanical system can determine the rotation and robot orientation on several axes giving the possibility for users to measure the angles and design robots with proper navigation systems. Students can use this sensor in building balancing robots with high accuracy in movements. Similar to the technology that keeps the image on smartphones orientated in the correct direction.
Used for object detection, follow a line, sorting objects, or detection of a normal or reflected light. The digital EV3 Color Sensor could be used for applications to detect the absence of color, the difference between colors, up to seven different colors, the light intensity. Features detection for up to seven colors; detect the absence of color; it works in ambient light; sample rate of 1 kHz; Auto-ID is built into the EV3 Software;
ORANGEREDGREENYELLOWPURPLEBLUEBLACKWHITE Measures the percentage of light reflected off of a surface. Brighter surface colors (white, yellow) reflect a larger percentage of light back to the sensor. (80 - 90%) Darker surface colors (black, blue) reflect a lower percentage of light back to the sensor (10 - 20%)
Port View Motor Control IR Control Brick Program Brick Dialog Allows you to instantaneously see the status or reading of the motors and sensors plugged into the brick.
Port View Motor Control IR Control Brick Program Brick Dialog Port View Motor Control IR Control Brick Program Brick Dialog Port View Allows you to instantaneously see the status or reading of the motors and sensors plugged into the brick.
EV3 -- - 45 2 --- 6 24 --- -15 79 Motors Sensors Allows you to instantaneously see the status or reading of the motors and sensors plugged into the brick.
The digital EV3 Gyro Sensor measures the robot’s rotational motion and changes in its orientation. Used to create precise turns measure angles, create balancing robots. Angle mode measures angles with an accuracy of +/- 3 degrees Gyro mode has a maximum output of 440 degrees/second --- 45 2