Question.4
Adam has connected the switch to GPIO 4 as follows. By running which of the following programs on Arduino UNO will damage its GPIO when the switch is pressed?
Select Answer
#define GPIO 4 void setup() { pinMode(GPIO, INPUT_PULLUP); } void loop() { bool readState = digitalRead(GPIO); }
#define GPIO 4 void setup() { pinMode(GPIO, OUTPUT); } void loop() { digitalWrite(GPIO,LOW); }
#define GPIO 4 void setup() { pinMode(GPIO, OUTPUT); } void loop() { digitalWrite(GPIO, HIGH); }
#define GPIO 4 void setup() { pinMode(GPIO, INPUT); } void loop() { bool readState = digitalRead(GPIO); }