Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the decision sentenses to the following designs ( Write them in a pseudo code format. A general example is available here ) : Design

Write the decision sentenses to the following designs (Write them in a pseudo code format. A general example is available here):
Design 1: Here, we are planning to program an automated light activation system. The light sensor is used as an input. The system will check the current light level and will turn the LED on if the light level of the room is low. Otherwise, it will ensure that the LED is off.
The light sensor is an analog sensor; the output values are in the range of 0 to 750 approximately (keep in mind the actual range of values you got in lab 1). Based on these values, think of a value]that represents the threshold or the "low" light level to use in your if statement design.
Design 2: Here, we are planning to create a simple security system with intrusion detection. The sound sensor is used as an input. The system will check the sound level. If it is high (this will be regarded as an intrusion), the system will ask the user to enter the admin password. If it is entered successfully, the buzzer will not sound. Otherwise, the buzzer will sound to trigger the alarm.
The sound sensor is an analog sensor; the output values are in the range of 0 to 500 approximately. Based on these values, think of a value that represents the "high" sound level to use in your if statement design to detect intrusion.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions