Question: Q 2 ( a ) An LED is directly connected to the digital pin 6 of an ESP 3 2 microcontroller that based on sinking

Q2(a) An LED is directly connected to the digital pin 6 of an ESP 32 microcontroller that based on sinking mode. While a push button switch is connected to the digital pin 7 of the microcontroller that based on pull-down resistor concept so that the logic signal is low when the push button switch is released.
(i) Sketch a schematic for the microcontroller that connected to the LED and the push button.
(6 marks)
(ii) Write a complete C -statement code in void setup () subroutine for relevant configurations.
(2 marks)
(iii) Write a complete C-statement code in void loop () subroutine for controlling the LED based on the push button switch state, i.e. when the push button switch is released, the LED will be turned off, and vice versa.
(6 marks)
Q 2 ( a ) An LED is directly connected to 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!