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
Chapter6: Arrays
Section: Chapter Questions
Problem 15RQ
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
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
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
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
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT