fbpx

UART using Arduino Uno

Type Of Communication

  • Device can transmit and receive data in two way communication
    • Parallel Communication,
    • Serial Communication.

Parallel Communication

  • Multiple data bits are transmit and receive simultaneously.
  • It is used for point to point communication.
  • Wireless communication is not possible.

Serial Communication

  • It send data one bit at a time,sequentially over a communication channel.
  • It require only one data bus.
  • Wireless communication is possible.

Arduino command

  • In arduino it have inbuilt Uart.
  • To make a serial communication predefined functions are used.
    • Serial.print().
    • Serial.read().
    • Serial.write().
    • Serial.event().

Circuit Diagram

Code

 Char  g;
 void setup()
 {
 Serial.begin(9600);
 }
 void loop()
 {
 Serial.print("Hello World");
 delay(1000);
 // type g in serial monitor and enter
 if(Serial.available() > 0)
 {
 char value = Serial.read();
 // received value is g then print value is received
 if(value == g)
 {
 Serial.print("Received");
 }
 }
 }

1 comment on “UART using Arduino Uno

Leave a Reply

Your email address will not be published. Required fields are marked *