Menu

Need Help Following Code Uart Send Text Pc Set Baudrate Print Hello Mbed Pc Open Terminal Q43819701

need help with the following code

UART

Send text to the PC

  •  Set the baudrate

  •  Print “Hello mbed” to the PC

  •  Open a terminal (e.g. putty) on the PC to view the message

/*—————————————————————————-
LAB EXERCISE – UART interface
SERIAL COMMUNICATION
—————————————-
   Print text to the PC via UART protocol
  
   Input: None
   Output: PC

   GOOD LUCK!
*—————————————————————————-*/

#include “mbed.h”
#include “pindef.h”

// Serial tx, rx connected to the PC via an USB cable
Serial device(UART_TX, UART_RX);

/*—————————————————————————-
MAIN function
*—————————————————————————-*/

int main(){
/*
Set the baudrate to 9600 bps
Print “Hello mbed” to the PC serial monitor
*/

//Write your code here
  
}

Expert Answer


Answer to need help with the following code UART Send text to the PC  Set the baudrate  Print “Hello mbed” to the PC …

OR