Report Bug

Qus

if a voltage of 5V is applied to the pin equivalent to the A0 pin on an Arduino UNO, what is the output of the programmed below?

void setup() {
    Serial.begin(9600);
    pinMode(A0, INPUT);
}
void loop() { 
    int s = analogRead(A0);
    Serial.println(s);
}
Qus

यदि Arduino UNO पर A0 पिन के बराबर पिन पर 5V का वोल्टेज लगाया जाता है, तो नीचे दिए गए प्रोग्राम का आउटपुट क्या है?

void setup() {
    Serial.begin(9600);
    pinMode(A0, INPUT);
}
void loop() { 
    int s = analogRead(A0);
    Serial.println(s);
}


A. 0
B. 5
C. 1024
D. 100


Solution
C. 1024



Explanation
The Arduino UNO’s analog pins map the value of the sensed voltage to an internal numbering scale which makes it easier for the programmer to work since it is more difficult to analog voltage levels in programming practice. Thus, for a value of 5V, which reaches the maximum limit, we get a value of 1024
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad