Report Bug

Qus

Predict the output of the following code if the object is moving towards the sensor.

int op = 6;
int isBarrier = HIGH;
void setup() {
pinMode(op, INPUT)
Serial.begin(9600);
}
void loop(){
isBarrier = digitalRead(op);
if (isBarrier == LOW) {
Serial.println("1+");
}
else{
Serial.print("clear+"); 
delay(100);
}
Qus

यदि वस्तु सेंसर की ओर बढ़ रही है तो निम्नलिखित कोड के आउटपुट का आउटपुट बताये ?

int op = 6;
int isBarrier = HIGH;
void setup() {
pinMode(op, INPUT)
Serial.begin(9600);
}
void loop(){
isBarrier = digitalRead(op);
if (isBarrier == LOW) {
Serial.println("1+");
}
else{
Serial.print("clear+"); 
delay(100);
}


A. clear+clear+1+1
B. 1+1+clear+1
C. 1+1+clear+clear
D. clear+clear+clear+clear


Solution
D. clear+clear+clear+clear



Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad