Search code examples
pythonautomationembeddedmicrocontrollercommunication

Python script to monitor program and control microcontroller


NOTE: System will not be connected to a network

I'm automating a device and need to create a script that will communicate with the micro-controller (to drive the motors) and with the original software (Thermo Fisher Scientific). The original software has a GUI interface but no API.

My original thought was to write a python script to first set the motors to the correct position -> then run the software -> save the data -> repeat.

I know how to communicate with the micro-controller to set the motors, but I'm unsure of how to communicate with the original software. Any advice on how to do this with python would be much appreciated.

Alternative methods are also welcome.

Thanks.


Solution

  • I have used AutoIt to solve similar problems. There is a Python extension available (I have never used this).

    AutoIt v3 is designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks.

    When using the python extension you will be able to directly interact with the GUI app from your source code.

    Alternatively you can also just build an Autoit executable to drive the software if the input into the GUI software is always the same.