Serial Communication Loop Back Test on Raspberry Pi with Python

Serial Loop Back on Raspberry Pi is the first Python Experiment every student have to perform on Pi kit, to check Serial is working or not. This tutorial provide step by step instruction to perform Serial Loop back.
import RPi.GPIO as GPIO
import time
import serial
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)

while True:
    print("write 1")
    print("read 1")
    #print("read start")
    #print("read end")
    print("read 1\n")
Note: To perform this experiment you have to short the GPIO Pin 8 and 10 with wire. Note: In Raspberry Pi configuration you have to enable the Serial Port, Disable the SSH, Disable Serial Console. Note: The read() function wait for one character to arrive at the input. It will wait for one char and the program is hold until one char received. Read More at More settings on serial port
ser = serial.Serial(
               baudrate = 9600,
           while 1:
               print x
You can leave a response, or trackback from your own site.

5 Responses to “Serial Communication Loop Back Test on Raspberry Pi with Python”

  1. I have to thank you for the efforts you’ve put in writing this blog. I am hoping to check out the same high-grade content by you later on as well. In truth, your creative writing abilities has encouraged me to get my own website now ;)|

  2. I got what you intend,saved to fav, very decent website .

  3. This post is priceless. How can I find out

  4. If you would like to increase your know-how just keep visiting this web site and be
    updated with the most recent information posted here.

  5. I blog quite often and I really appreciate your content.
    This great article has truly peaked my interest.
    I will book mark your blog and keep checking for new details about once a week.
    I opted in for your RSS feed as well.

Leave a Reply to the article

Learning & Certifications
Follow Us
Facebook Icon   Linked In Icon   Twitter Icon  
Validation and Recognition

Valid CSS! Valid HTML5!          Protected by Copyscape