Study the following circuit:   Definitions S1 = 0 / S2 = 0 means the button is pressed down S1 = 1 / S2 = 1 means the button is not pressed down Question Suppose S1 = 0 Suppose S2 = 0 void setup() { Serial.begin(9600); pinMode(13, OUTPUT); pinMode(2, INPUT); pinMode(3, INPUT); } void loop() { delay(2000); int button1_val = !digitalRead(2); // button1_val = 1 when pressed, 0 when not pressed  int button2_val = !digitalRead(3); // button2_val = 1 when pressed, 0 when not pressed  if (button1_val == 1 && button2_val == 1) { // AND = && (both of them) digitalWrite(13, 1); // turn on } else {    digitalWrite(13, 0); // turn off } } Use the following codes to describe the state of the LED, and values of the variables. Your answer should either be 0, 1, 2, 3, 4, 5, 6, or 7. If your answer is 0, Canvas might flag the question as unanswered. It is safe to ignore this message. CODE LED button1_val button2_val 0 OFF 0 0 1 OFF 0 1 2 OFF 1 0 3 OFF 1 1 4 ON 0 0 5 ON 0 1 6 ON 1 0 7 ON 1 1简答题

题目图片

登录即可查看完整答案

我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!