How to use USB pins?
Posted: Sun Apr 19, 2020 10:29 am
Hello. I encountered a restriction on the use of pins. I need to use USB pins (PA11 and PA12) for my own purposes. But if I write a simple sketch, then the pin switching does not happen:
It seems that somewhere these pins are used, possibly USB Serial. Can I use these pins somehow?
Code: Select all
#define Pin1 PA11
#define Pin2 PA12
void setup() {
pinMode(Pin1, OUTPUT);
pinMode(Pin2, OUTPUT);
}
void loop() {
digitalWrite(Pin1, LOW);
digitalWrite(Pin2, LOW);
delay(1000);
digitalWrite(Pin1, HIGH);
digitalWrite(Pin2, HIGH);
delay(1000);
}