ArduinoGeneral

IO9 / D5 Does nothing when pinMode(OUTPUT); digitalWrite(LOW);

userHead foodini 2021-08-28 18:27:43 527 Views1 Replies
I've tried this with three different FireBeetle V4.0 boards, and they all behave the same way: IO9 will not work as a General Purpose output pin. When I run the following, pin 9 will go to 3.3v and stay there. I've verified this with an LED (with a current limiting resistor) as well as an oscilloscope. Everything works as expected on pin 5:
Code: Select all
void setup() {
  pinMode(9, OUTPUT);
  pinMode(5, OUTPUT);
}

void loop() {
  digitalWrite(9, HIGH);
  digitalWrite(5, HIGH);
  delay(250);
  digitalWrite(9, LOW);
  digitalWrite(5, LOW);
  delay(250);
}
What's the deal here? Did I get a bad batch of boards? I don't see anything in the docs (that I've found) that suggest that this GPIO isn't General Purpose.

Thanks
2024-11-15 20:29:55

Sorry for posting after several years but I had a similar problem.

However pin D5 is also used by the USB port and so cannot be used if using USB; search for D5 here as it mentions this “feature”:

 

https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654

 

userHeadPic MichaelDoherty