Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
9th Edition
ISBN: 9781337669405
Author: FARRELL
Publisher: Cengage
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
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
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
Step by stepSolved in 2 steps
Knowledge Booster
Background pattern image
Recommended textbooks for you
- Text book imageProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageText book imageProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningText book imageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Text book imageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Text book imageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrText book imageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning