Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- marker = '1'
- msg_list = []
- while marker != '\\n':
- marker = ser.read(1)
- msg_list.append(marker)
- #i get a list of bytes.
- #then if i do
- f = open('filename', 'wb')
- for i in msg_list:
- f.write(i)
- f.close()
- # now when i do this
- msg = ser.read(24)
- f = open('filename', 'wb')
- f.write(msg)
- f.close()
- if i do in a linux term
- file filename, it says data
- but says something like ascii file if i do it the earlier way.
- does this make sense?
Add Comment
Please, Sign In to add comment