I'm trying to set PB2 as a pull-up input on a WeAct STM32F411CEU6 BlackPill. The pinMode assignment appears to be ignored and PB2 acts like a pull-down input.
See the below...
Code: Select all
#include <Arduino.h>
void setup(){
pinMode(PB1, INPUT_PULLUP);
pinMode(PB2, INPUT_PULLUP);
Serial.begin(115200);
}
void loop(){
Serial.println("PB1 = " + (String) digitalRead(PB1));
Serial.println("PB2 = " + (String) digitalRead(PB2));
delay( 1000 );
}
Does anyone know why? Is there a way to configure PB2 as a pull-up?
Thanks!