void setup() {
// Initialize serial communication at 115200 bits per second
Serial.begin(115200);
}
void loop() {
Serial.println("Hello from STM32!"); // Print a message
delay(1000); // Wait for one second
// Read from Serial Monitor and echo back
if (Serial.available() > 0) {
char receivedChar = Serial.read(); // Read the incoming byte
Serial.print("I received: ");
Serial.println(receivedChar);
}
}