Question: I have this coding assignment and I have try to code and build the circuit with IR sensor but it didn't go well. I need

I have this coding assignment and I have try to code and build the circuit with IR sensor but it didn't go well. I need help in building the circuit and the Arduino code.

 I have this coding assignment and I have try to code

This competency assignment is due by the deadline stated on blackboard. This is the last and final opportunity to demonstrate mastery of the Coding competency. This is an individual (not a team) assignment, and your assignment must be typed and submitted on the blackboard site Coding: Write accurate, executable code to make the Arduino perform a simple, defined function. For this competency assignment, you need to create an Arduino program that takes input from an IR distance sensor and controls an LED (you can use the default LED connected to pin 13 on the Arduino board) as follows If no object is within range of the sensor, the LED is not lit. If an object is between 20 and 30 cm away from the sensor, the LED is lit. If an object is between 50 cm and 80 cm away from the sensor, the LED blinks 5 times per * secon You should include the following in your submission (pdf or doc only. Arduino .ino files are not acceptable). 1. One paragraph and a photo or drawing that shows how the sensor and LED are connected to the Arduino. A flowchart that describes the process executed by the loop(O function. Your complete Arduino code WITH comments explaining the function of each line A youtube video link showing your demonstration of the code. Please show the distance measured using a ruler/measuring tape and the LED blinking in the video. (you can make the video unlisted if you don't want it to be public) 2. 3. 4. In this CT you will be using multiple if statements, to write your code. An example code snippet on how to implement if statements is given below: Checking for grades B and E corresponding to Competency Points: /*This program turns off an LED when ct points correspond to aB and turns on an LED when CT points correspond to an E */ int ctpoints; //stores the total ct points scored by the student void setup0 pinMode(13, OUTPUT); //pin13 where LED is connected is an Output pin void loop() if(ctpoints-13) //check if ct points are between 13 and 14 digitalWrite(13,LOW); //Turn off the LED connected to pin 13 iftctpointsJ)/check if ct points are digitalWrite(13,HIGH); //Turn on the LED connected to pin 13 This competency assignment is due by the deadline stated on blackboard. This is the last and final opportunity to demonstrate mastery of the Coding competency. This is an individual (not a team) assignment, and your assignment must be typed and submitted on the blackboard site Coding: Write accurate, executable code to make the Arduino perform a simple, defined function. For this competency assignment, you need to create an Arduino program that takes input from an IR distance sensor and controls an LED (you can use the default LED connected to pin 13 on the Arduino board) as follows If no object is within range of the sensor, the LED is not lit. If an object is between 20 and 30 cm away from the sensor, the LED is lit. If an object is between 50 cm and 80 cm away from the sensor, the LED blinks 5 times per * secon You should include the following in your submission (pdf or doc only. Arduino .ino files are not acceptable). 1. One paragraph and a photo or drawing that shows how the sensor and LED are connected to the Arduino. A flowchart that describes the process executed by the loop(O function. Your complete Arduino code WITH comments explaining the function of each line A youtube video link showing your demonstration of the code. Please show the distance measured using a ruler/measuring tape and the LED blinking in the video. (you can make the video unlisted if you don't want it to be public) 2. 3. 4. In this CT you will be using multiple if statements, to write your code. An example code snippet on how to implement if statements is given below: Checking for grades B and E corresponding to Competency Points: /*This program turns off an LED when ct points correspond to aB and turns on an LED when CT points correspond to an E */ int ctpoints; //stores the total ct points scored by the student void setup0 pinMode(13, OUTPUT); //pin13 where LED is connected is an Output pin void loop() if(ctpoints-13) //check if ct points are between 13 and 14 digitalWrite(13,LOW); //Turn off the LED connected to pin 13 iftctpointsJ)/check if ct points are digitalWrite(13,HIGH); //Turn on the LED connected to pin 13

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!