<html><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:10px"><div><span style="font-size: 16px;">Hi,</span></div><div><span style="font-size: medium;">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.</span></div><div><span style="font-size: medium;">But when I try it rpi and atmega I get blank lines as output. My python code is </span></div><div><span style="font-size: medium;"><br></span></div><div style="color: rgb(0, 0, 0); font-family: 'Helvetica Neue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span style="font-size: medium;">import serial</span></div><div><span style="font-size: medium;">ser =
 serial.Serial('/dev/ttyAMA0',38400,timeout = 10)</span></div><div><span style="font-size: medium;">while True:</span></div><div><span style="font-size: medium;">        print "try"</span></div><div><span style="font-size: medium;">        val = ser.read(10)</span></div><div><span style="font-size: medium;">        print val</span></div><div><span style="font-size: medium;">Output:</span></div><div><span style="font-size: medium;">try</span></div><div><span style="font-size: medium;"><br></span></div><div style="color: rgb(0, 0, 0); font-family: 'Helvetica Neue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span style="font-size: medium;">try.</span></div><div style="color: rgb(0, 0, 0); font-family: 'Helvetica Neue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida
 Grande', sans-serif; font-style: normal; background-color: transparent;"><span style="font-size: medium;">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.</span></div><div style="color: rgb(0, 0, 0); font-family: 'Helvetica Neue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span style="font-size: medium;">Thanks in advance.</span></div><div style="color: rgb(0, 0, 0); font-family: 'Helvetica Neue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span style="font-size: medium;"><br></span></div><div></div><div><span style="font-size: medium;"> </span></div><div><span style="font-size: medium;">Gautam
 Venkata,
<br>SolarMobil.</span></div></div></body></html>