UART communications is a simple example where you can make the informed decision between using polling and interrupts.
If you need to transmit a string of characters and there is nothing else timely that the processor has to do, you can use polling to determine when the UART is ready to accept another character to be transmitted.
On the other hand, if the processor has to perform any process while at the same time receive characters, then it is critical that no character is missed. Here, you would use interrupts in order to receive all characters and store them away in a receiver buffer. You only need to determine that an "end of text" character has been received in order to notify the main process that the full message has been received.
If you need to transmit a string of characters and there is nothing else timely that the processor has to do, you can use polling to determine when the UART is ready to accept another character to be transmitted.
On the other hand, if the processor has to perform any process while at the same time receive characters, then it is critical that no character is missed. Here, you would use interrupts in order to receive all characters and store them away in a receiver buffer. You only need to determine that an "end of text" character has been received in order to notify the main process that the full message has been received.


