| Posted: 04:06pm 17 Apr 2018 |
Copy link to clipboard |
 Print this post |
|
I have been using Geany to edit my code and started thinking of how to make use of the extra tool slots. Still reading up on that but did get around to making these two scripts work.
xsend.sh will stop the MicroMite then send the "xmodem r" and the using sx will send the file to the MicroMite then send "run" and newline
xrecv.sh will stop the MicroMite then send the "xmodem s" and the using rx will get the file from the MicroMite then send "run" and newline. It strips any nulls at the end of the file.
xsend.sh #!/bin/bash # while in file manager (nemo) I open a term # and type in the following # xsend.sh file2send port (ttyACMx ttyUSBx) # this is raw and experimental
DEV=/dev/$2 echo $'\cc' "xmodem r" > $DEV sleep 2 sx $1 > $DEV < $DEV sleep 2 echo "run" $'\n' > $DEV
xrecv.sh #!/bin/bash # while in file manager (nemo) I open a term # and type in the following # xrecv.sh file2get port (ttyACMx ttyUSBx) # this is raw and experimental
DEV=/dev/$2
echo $'\cc' "xmodem s" > $DEV sleep 2 rx $1 > $DEV < $DEV sleep 2 echo "run" $'\n' > $DEV sleep 2 tr < $1 -d '\000' > "tmp" mv tmp $1
I have more I am trying to get working and will post as I get them to "KISS" mode. There are a few python scripts "Find_ports.py -l" and miniterm.py it defaults to 9600 a ^T b 38400. Playing with it to learn python. A quick way to do some input after xsend is to use screen /dev/ttyACM0 38400 it also useful to edit.
Hope some can make use of these.
Quazee
|