The serial send routine (readPrintFileLines(pathFileName)) reads a line at a time and strips off the newline. It would be a good addition as an option but since I'm only handling ASCII serial data at the moment I added it back in.
# readPrintFileLines() Dump file to USB serial
def readPrintFileLines(pathFileName):
global uart
with open(pathFileName, "r") as f:
for line in f:
if serialDebug:
print(line, end='')
uart.write(bytes(line, 'utf-8'))
uart.write(bytes('\r', 'utf-8'))
Grabbed data using an FTDI card
Dumped a file to TeraTerm connected to the FTDI card.
Looks good.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.