// 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");

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

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
.....
Transcribed Image Text:TMP POWER ANALOG IN .....
1J4J44
DIGITAL (PWM-)
OO UNO
ARDUINΟ
THP
POWER
ANALOG IN
HILL
Transcribed Image Text:1J4J44 DIGITAL (PWM-) OO UNO ARDUINΟ THP POWER ANALOG IN HILL
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY