#define LED_PIN PC15
#define BUTTON_PIN PA1
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, STM32!");
pinMode(LED_PIN,OUTPUT);
pinMode(BUTTON_PIN, INPUT_PULLUP);
}
void loop() {
int value = digitalRead(BUTTON_PIN);
if (value == LOW)
digitalWrite(LED_PIN, HIGH);
// put your main code here, to run repeatedly:
else
digitalWrite(LED_PIN, LOW);
}