Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (35 sloc) 946 Bytes
/*
* Serial1 example with Nucleo 64 STM32F411 which is supported in Arduino IDE by
* www.github.com/stm32duino
*
* Description:
* Sends "Hello World" message through hardware Serial1
* Baudrate is 9600 Bd
*
* Connection:
* Serial1 is connected to PA9 and PA10
* TX - PA9 ( Arduino D8) -> connect TX of STM32 to RX of USB-UART converter
* RX - PA10 (Arduino D2) -> connect RX of STM32 to TX of USB-UART converter
* GND to GND
*
* Define serial and RX, TX pins
* HardwareSerial Serial1(rx, tx);
*
* Made by http://stm32duino.eu (2018)
*/
// set RX and TX pins
HardwareSerial Serial1(PA10, PA9);
// the setup function runs once when you press reset or power the board
void setup()
{
// initialize Serial1:
Serial1.begin(9600);
}
// the loop function runs over and over again forever
void loop()
{
// send "Hello World" message through Serial1
Serial1.println("Hello World");
// wait one second
delay(1000);
}
You can’t perform that action at this time.