(a) Draw a flow chart to a program that will have a steering servo motor move based on an input from a light sensor. The rover can follow the dark line on the floor because of the light reflected from that dark line has low intensity. When the rover goes off course and there is no more dark line on the floor below the rover, the light intensity is higher. The light intensity values of the light sensor will range from 0 to 1023 (higher values corresponding to brighter light). When the value of the light intensity increases above 400 it means that the rover is off course and the servo motor that controls the steering of the rover should be activated to put the rover back on course. We will assume that if light intensity is below 400, no steering should be performed, when the light intensity is above 400, the servomotor should go to -45 degrees until the light intensity drops below

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question
(a) Draw a flow chart to a program that will have a steering servo motor move based on
an input from a light sensor. The rover can follow the dark line on the floor because of
the light reflected from that dark line has low intensity. When the rover goes off course
and there is no more dark line on the floor below the rover, the light intensity is higher.
The light intensity values of the light sensor will range from 0 to 1023 (higher values
corresponding to brighter light). When the value of the light intensity increases above
400 it means that the rover is off course and the servo motor that controls the steering
of the rover should be activated to put the rover back on course. We will assume that if
light intensity is below 400, no steering should be performed, when the light intensity is
above 400, the servomotor should go to -45 degrees until the light intensity drops below
400. We will assume for simplicity that our rover only veers to the right to get off the
line and it would require to move servo to -45 degrees to put the rover back over the
line. Once the light intensity falls below 400, the servo moves to 0 degrees. This
procedure is performed in a loop to keep the rover over the dark line.
(b) Write this algorithm using pseudo code.
(c) Write the algorithm as if you are writing in Arduino IDE.
Transcribed Image Text:(a) Draw a flow chart to a program that will have a steering servo motor move based on an input from a light sensor. The rover can follow the dark line on the floor because of the light reflected from that dark line has low intensity. When the rover goes off course and there is no more dark line on the floor below the rover, the light intensity is higher. The light intensity values of the light sensor will range from 0 to 1023 (higher values corresponding to brighter light). When the value of the light intensity increases above 400 it means that the rover is off course and the servo motor that controls the steering of the rover should be activated to put the rover back on course. We will assume that if light intensity is below 400, no steering should be performed, when the light intensity is above 400, the servomotor should go to -45 degrees until the light intensity drops below 400. We will assume for simplicity that our rover only veers to the right to get off the line and it would require to move servo to -45 degrees to put the rover back over the line. Once the light intensity falls below 400, the servo moves to 0 degrees. This procedure is performed in a loop to keep the rover over the dark line. (b) Write this algorithm using pseudo code. (c) Write the algorithm as if you are writing in Arduino IDE.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education