Back to Course
Class 6 - Coding, AI & Robotics Course
0% Complete
0/0 Steps
-
Coding
Session 1: Introduction to Coding3 Topics -
Session 2: Backdrop, Costume, and Animation3 Topics|1 Quiz
-
Session 3: Basics of Algorithm and Flowchart3 Topics|1 Quiz
-
Session 4: Basics of Pseudocode3 Topics|1 Quiz
-
Session 5: Getting Started with Quarky3 Topics|1 Quiz
-
Session 6: Variables: The Multitaskers4 Topics|1 Quiz
-
Session 7: Arithmetic Operators4 Topics|1 Quiz
-
Session 8: Conditional Statements3 Topics|1 Quiz
-
Session 9: Logical Operators4 Topics|1 Quiz
-
Session 10: Nested Conditional Statements2 Topics|1 Quiz
-
Session 11: Loops3 Topics|1 Quiz
-
Session 12: Touch Based Piano2 Topics
-
Session 13: Criterial in Loops5 Topics|1 Quiz
-
Session 14: Catch the Fruit Game - Part 12 Topics
-
Session 15: Catch the Fruit Game - Part 22 Topics|1 Quiz
-
Artificial IntelligenceSection 16: Introduction to Artificial Intelligence3 Topics|1 Quiz
-
Session 17: Basics of Face Detection2 Topics|1 Quiz
-
Session 18: Face Expression Detection2 Topics|1 Quiz
-
Session 19: Mimic Face with Quarky1 Topic
-
Session 20: Face Filter - Part 12 Topics
-
Session 21: Face Filter - Part 22 Topics
-
RoboticsSession 22: Basics of Robotics2 Topics|1 Quiz
-
Session 23: Wirelessly Controlled Robot2 Topics
-
Session 24: Introduction to Sensors3 Topics|1 Quiz
-
Session 25: Introduction to Actuators3 Topics|1 Quiz
-
Session 26: Face Tracking with Robot2 Topics
-
Session 27: Obstacle Avoidance Robot - Part 13 Topics
-
Session 28: Obstacle Avoidance Robot - Part 22 Topics|1 Quiz
-
Session 29: Edge Detector Robot - Part 13 Topics
-
Session 30: Edge Detector Robot - Part 22 Topics|1 Quiz
-
Capstone ProjectCapstone Project
Lesson 29,
Topic 3
In Progress
Logic & Flowchart
Lesson Progress
0% Complete
Edge Detection Logic
To avoid falling, our robot will change its path whenever it detects an edge by calculating the distance between the sensor and the surface. If the distance is more than 10 cm, that means an edge has been detected, and the robot will move in a different direction as a result.
Let’s look at the login in detail:
- Our edge detector will move forward whenever the distance between the ultrasonic sensor and the surface should be less than 10cm.
- Edge is detected when the distance between the ultrasonic sensor and surface is more than 10cm. The robot stops detecting an edge.
- The ultrasonic head turns to the left to check whether there is an edge on the left or not.
- If there is no edge on the left, Quarky will change its direction to the left by turning left by 90 degrees. The ultrasonic head will get straight. And the robot moves ahead.
- If there is an edge detected on the left side, the ultrasonic head turns to the right.
- If no edge is detected, Quarky changes its direction to the right by turning right. The ultrasonic head will get straight. And moves ahead.
- If it will detect edges in all the directions. Quarky will move backward.
Flowchart
Below is the flowchart representation of our logic. We will write a script for the robot in the next topic.