Using command files.


 

 Command files are similar to batch files. The have an extension of mmc instead of bas. mmc = MaxiMite Control

You can use command files by dragging them from Windows explorer onto the MMCC terminal window or, provided the first line has the s\command setting present, you can also upload it from MMEdit the same way as normal bas files.

Changing many of the OPTION settings results in a reboot of the device. This can cause the connection to the PC to be lost.
With command files, you can instruct MMCC to wait a number of seconds before attempting to reconnect.

The following directives are available. There is no space between the ' and the command.
'reconnect nn [port] = Disconnect the device wait nn seconds then reconnect. If a com port in the form "com4:115200 etc is found, this port will be used to reconnect. This is useful if you have sent a command to change the console baud rate. Linux users - port change not available yet.

'reconnect n = reconnect with  n seconds delay. Useful if autoreconnect doesn't work (Linux users)

'nap nn = wait nn seconds before sending the next line. Useful for slow devices. * Not required when using line by line confirmation.

'settime = set the device time to PC time.

blank lines will send <CR> or the current line-ending

All other lines are sent as is.

One example of a command file is used for re-configuring a picomite after firmware updates. (This is not normally required)

'target port\com4:115200 s\command
option reset

flash erase all
var clear
OPTION CPUSPEED 250000
OPTION SYSTEM SPI 14,15,16
OPTION SDCARD 17
OPTION LCDPANEL ILI9341,L,10,11,12
OPTION TOUCH 19,20
GUI CALIBRATE 0, 250, 504, 925, 747
'settime

Each line is displayed with three options 
Yes send this line
No skip this line
Cancel skip this line and all subsequent lines.

Updating a pico is as simple as 
dragging the uf2 file onto the MMCC console, wait for the firmware update to finish,
drag the pico.mmc configuration file onto the MMCC console area.

You now have an updated and clean picomite again.

 

 

Last edited: 05 April, 2023