// convert to Fahrenheit float tempF = [............................] .(7) // print the temp in degrees Fahrenheit Celcius second row of display [.............................].(8) lcd.print(String(tempF) + " deg F"); } else { // print "Temp in Celcius" in the first row of the display [..........................] .(9) lcd.print("Temp in Celcius");
Consider circuit diagram and the program below.. Note:this two pictures of the circuit its shows the connections on one diagram,
Make use of the comments to complete the program by selecting the correct option to complete the missing or incomplete statements:
Let incomplete statements be [..................]. (number) so that you can see them while reading the code
Answer only [...........]. (7)..,[............].(8)..,[...............].(9)...
// include the LCD library
[......................]. (1)..... Answered
// create a variable for controlling brightness
int ledBrightness;
// create a variable for reading the switch value
int sPin = 12;
// this is the initializing of the lcd libray and interface pin
[..........................] .(2)...... Answered
void setup()
{
// setup the lcd as a 16 character by 2 row display
[...........................] .(3)...... Answered
// setup the switch pin to be an input
pinMode(sPin, INPUT);
}
void loop()
{
// refresh the LCD first row
lcd.setCursor(0,0);
lcd.print(" ");
// read the values coming from our sensor
int tempSens =
[.........................] .(4)..... Answered
// converting that reading to voltage
float sensVolt = tempSens * 5;
sensVolt /= 1024;
// convert from 10 mv per degree with 500 mV offset to degrees ((voltage - 500mV) times 100)
float tempC =
[............................] .(5)..... Answered
if(digitalRead(sPin) == LOW)
{
// print "Temp in Fahrenheit" in the first row of the display
[...........................] .(6)..... Answered
lcd.print("Temp in Fahrenheit");
// convert to Fahrenheit
float tempF =
[............................] .(7)
// print the temp in degrees Fahrenheit Celcius second row of display
[.............................].(8)
lcd.print(String(tempF) + " deg F");
}
else
{
// print "Temp in Celcius" in the first row of the display
[..........................] .(9)
lcd.print("Temp in Celcius");
// print the temp in degrees Celcius second row of display
[..........................] .(10)
lcd.print(String(tempC) + " deg C");
}
// map the sensor value to brightness ,min is 0 and max is 255
[...........................] .(11)
// write the brightness value out to pin 11
analogWrite(11, ledBrightness);
delay(500);
}
![TMP
POWER
ANALOG IN
.....](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ff55b7516-b7b6-4b93-adcf-f3eb48a0db29%2Fbe9d31e0-ee2e-4428-b468-ac2e17417ab7%2Fvryvavs_processed.jpeg&w=3840&q=75)
![1J4J44
DIGITAL (PWM-)
OO UNO
ARDUINΟ
THP
POWER
ANALOG IN
HILL](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ff55b7516-b7b6-4b93-adcf-f3eb48a0db29%2Fbe9d31e0-ee2e-4428-b468-ac2e17417ab7%2Fiuqi59q_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)