Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In this program why do you need to divide the signal coming from the analog inpu

ID: 3665904 • Letter: I

Question

In this program why do you need to divide the signal coming from the analog input by four before sending it out to the analog output pin?

/* Type the command to start the serial communications with a

Serial.begin command here. YOU DO THIS.*/

} void loop(){

pos_int = analogRead(A0); /*Here, read the analog voltage

applied to analog input 0.*/

Serial.print("The analog input is ");

Serial.print(pos_int);

Serial.println(".");

/*Next, write the position from the pot. to the led pin.*/

ana_volt = pos_int/4; analogWrite(led, ana_volt);

}

Explanation / Answer

I think the amplitude of the imcoming analog signal is higher than what is required for the led_pin because led usually requires 2 volts. To decrease the amplitude of the signal so that the led can be operated safely we have divided the incoming signal by 4.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote