[Tutor] Python Serial Communication

m.v gautam mvg_gautam at yahoo.com
Sun Sep 28 11:32:26 CEST 2014


Hi,
I am trying out serial communication between raspberry pi and atmega 32 using pyserial module . I have tried serial communication between two atmega and it is working.
But when I try it rpi and atmega I get blank lines as output. My python code is 

import serial
ser = serial.Serial('/dev/ttyAMA0',38400,timeout = 10)
while True:
        print "try"
        val = ser.read(10)
        print val
Output:
try

try.
There is a blank line being printed every time in place of val. The logic level conversion between atmega and rpi has been done perfectly.Can you tell me why 'val' is being printed as blank value.
Thanks in advance.

 
Gautam Venkata, 
SolarMobil.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140928/66e2b6de/attachment-0001.html>


More information about the Tutor mailing list