IOT102_-_SU_2024_-_FE_2251.webp
Văn Thành

IOT102_-_SU_2024_-_FE_2251.webp

(Choose 1 answer)
What is the output of "pin1" if "pin2" is sent "1011" where 1 is 5V and 0 is OV?
int pin1 = 12;
int pin2 = 11;
void setup() {
pinMode(pin1, OUTPUT);
pinMode(pin2 , INPUT);Serial.begin(9600);
} void loop() {
if(digitalRead(pin2)==1) { digitalWrite(pin1,LOW);
}
else if(digitalRead(pin2)==0) { digitalWrite(pin1, HIGH);
}
}
Α. 1110
B. 0100
C. 1111
D. 1011

  • Love
Reactions: seloena

Thông tin

Category
IOT102
Thêm bởi
Văn Thành
Ngày thêm
Lượt xem
6,215
Lượt bình luận
46
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
IOT102_-_SU_2024_-_FE_2251.webp
File size
166.7 KB
Dimensions
1920px x 930px

Share this media

Back
Bên trên Bottom