import serial
import time
ser=serial.Serial("/dev/ttyS0",9600)
def write():
for i in range(10):
a= ("%3d"%i) +" _ "+ ("%5d"%(i*i))+"\n"
ser.write(a)
time.sleep(0.5)
write()
import time
ser=serial.Serial("/dev/ttyS0",9600)
def write():
for i in range(10):
a= ("%3d"%i) +" _ "+ ("%5d"%(i*i))+"\n"
ser.write(a)
time.sleep(0.5)
write()
Hiç yorum yok:
Yorum Gönder