☰
Debian Codegraph
@
5.3.5+repack-1
/
/
microhope
/
microhope-doc
/
prog
/
receive.py
☽
☼
microhope/microhope-doc/prog/receive.py
code
plain
raw
GPL-3
2010-2018 Ajith Kumar B.P <
[email protected]
>
debian/copyright
1
import serial
2
ser = serial.Serial('/dev/ttyS0', 38400, stopbits=1)
3
4
count = 0
5
val = ''
6
while(1):
7
while ser.inWaiting() == 0:
8
pass
9
x=ser.read()
10
if ord(x) == 0: #Print when end of string
11
print (val)
12
val = ''
13
else:
14
val = val + x