Created
September 2, 2019 13:09
-
-
Save uruskan/1b77ac210ccaf4e37e9d2376303d5296 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import serial as sl | |
import time | |
ser = sl.Serial('COM10', baudrate=9600) | |
rawdata=[] | |
count = 0 | |
a = str(ser.readline()) | |
while count < 70: | |
rawdata.append(str(ser.readline())) | |
time.sleep(0.10) | |
count = count + 1 | |
# if ("tamam" in str(ser.readline())): Arduion'dan dogru veriler sayesinde 'tamam' geldigi zaman icin. | |
# print "MERHABA" | |
txt = str(ser.readline()).split('-') #Gelen verileri '-' gore ayirip yaziyor. | |
print (str(ser.readline())) | |
print "ilk : " , txt[0] | |
print "son : " , txt[1] | |
#print rawdata | |
#/dev/tty.usbmodem1421 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment