I am using an arduino and save the output with minicom but want to automate the process for opening recording and closing the text file.
I am currently using the following: first I give the following command in the terminal:
$ minicom -D /dev/cu.usbserial-1420 -b 115200
Then for the opening recording and closing of the text file: have to do the following:
- Press Ctrl A + Z
- Press Shift + L for start recording
- Waiting for writing output
- Press Shift + L for stop recording
- Check file minicom.cap – it’s a text file and you can open using any text editor
which is a bit cumbersome
Instead what I want to do is to write a bash script (.sh or .zsh) which would look like this:
# Command number 1 to be implemented which open a text file and start writing the output
sleep 2 #(peforms the recording during 2 seconds)
# Command number 2 to be implemented which stops the writing and close the file