1 #include 2 3 float Digitized Volt =0; 4 int Lux =0; 5 int Servo_angle = 0; 6 7 Servo servo_11; 8 9 void setup() 10 11 { 12 13 14} 15 Serial.begin(9600); pinMode (AO, INPUT); servo 11.attach (11); 16 void loop() 17 { ((analogRead(AO)) 0.0048828125); 18 Digitized Volt = ((analogRead (A0)) 19 20 Lux = (2500/DigitizedVolt - 500)/3.3; 21 Servo_angle = map (Lux, 0, 225, 0, 180); 22 servo 11.write(Servo_angle); 23 24 Serial.print(Lux); 25 Serial.println(" Lux"); 26 Serial.print (Servo_angle); 27 Serial.println(" Degree"); 28 29 delay(1000); 30 31}
1 #include 2 3 float Digitized Volt =0; 4 int Lux =0; 5 int Servo_angle = 0; 6 7 Servo servo_11; 8 9 void setup() 10 11 { 12 13 14} 15 Serial.begin(9600); pinMode (AO, INPUT); servo 11.attach (11); 16 void loop() 17 { ((analogRead(AO)) 0.0048828125); 18 Digitized Volt = ((analogRead (A0)) 19 20 Lux = (2500/DigitizedVolt - 500)/3.3; 21 Servo_angle = map (Lux, 0, 225, 0, 180); 22 servo 11.write(Servo_angle); 23 24 Serial.print(Lux); 25 Serial.println(" Lux"); 26 Serial.print (Servo_angle); 27 Serial.println(" Degree"); 28 29 delay(1000); 30 31}
Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter8: Advanced Data Handling Concepts
Section: Chapter Questions
Problem 1PE
Related questions
Question
can you explain the purpose of the following lines of code.
line:
1, 5, 7, 11, 12, 16, 18, 21, 26, 29

Transcribed Image Text:1 #include <Servo.h>
2
3 float Digitized Volt =0;
4 int Lux =0;
5 int Servo_angle = 0;
6
7 Servo servo_11;
8
9 void setup()
10
11
{
12
13
14}
15
Serial.begin(9600);
pinMode (AO, INPUT);
servo 11.attach (11);
16 void loop()
17 {
((analogRead(AO)) 0.0048828125);
18 Digitized Volt = ((analogRead (A0))
19
20 Lux = (2500/DigitizedVolt - 500)/3.3;
21 Servo_angle = map (Lux, 0, 225, 0, 180);
22 servo 11.write(Servo_angle);
23
24 Serial.print(Lux);
25 Serial.println(" Lux");
26 Serial.print (Servo_angle);
27 Serial.println(" Degree");
28
29 delay(1000);
30
31}
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,

C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning