Question: Write a sketch using Arduino IDE and include the full code as a text in your solution. Design and simulate the hardware circuit using Proteus.

Write a sketch using Arduino IDE and include the full code as a text in your solution.
Design and simulate the hardware circuit using Proteus. Then, include the following images in your solution:
a. The design of your circuit before running your simulation.
b. All states of your simulation showing all possible cases.
Question 1: We want to design an embedded system using Arduino Uno board that will measure the light level with LDR sensor and four red LEDs as illustrated in Figure 1.
We will have five possible cases:
If the read value from LDR sensor is 0, all LEDs will be OFF.
If the read value from LDR sensor is larger than 0 and less than or equal 255, only the first LED (pin7) will be ON.
If the read value from LDR sensor is larger than 255 and less than or equal 511, only the first LED (pin7) and second LED (pin6) will be ON.
If the read value from LDR sensor is larger than 511 and less than or equal 767, only the first LED (pin7), second LED (pin6), and third LED (pin5) will be ON.
If the read value from LDR sensor is larger than 767 and less than or equal 1023, all LEDs will be ON.
Notes:
Add a delay of 100 ms at the end of the loop function.
In Proteus, pick up the "Torch and Light Dependent Resistor" as shown in Figure 2 to simulate the LDR and light intensity.
Write a sketch using Arduino IDE and include the

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 Electrical Engineering Questions!