aaa
This commit is contained in:
parent
e6774e9e33
commit
c9360587cb
35 changed files with 3191 additions and 0 deletions
|
@ -0,0 +1,25 @@
|
|||
import serial
|
||||
|
||||
ser = serial.Serial("COM7", 19200, timeout=0.1)
|
||||
|
||||
#def read_until(until):
|
||||
# out = ()
|
||||
# while 'until' != 'out':
|
||||
# out = (ser.read(1000))
|
||||
# return out
|
||||
|
||||
def read_until(something):
|
||||
output = ()
|
||||
while something not in output:
|
||||
output = (ser.read(124000))
|
||||
#print (output)
|
||||
return output
|
||||
|
||||
print ("__Attente de la réponse du board")
|
||||
print ((read_until(b'>>')).decode())
|
||||
|
||||
ser.write(('933d86ae930c9a5d6d3a334297d9e72852f05c57#cat.txt:finances.csv\r\n').encode())
|
||||
print ("__Attaque")
|
||||
|
||||
print ("__Attente de la réponse après l'attaque")
|
||||
print (((read_until(b'\r\n\r\n'))).decode())
|
Loading…
Add table
Add a link
Reference in a new issue