7.2 Steps to Run the Python 3.11 Environment

The following are the steps to run the Python 3.11 environment:

  1. Open IDLE (Python 3.11 32-bit) in the Python 3.11 folder from the PC Start menu.
    Figure 7-1. Python IDLE
  2. The following figure illustrates the “IDLE” window of “Python 3.11”.
    Figure 7-2. IDLE
  3. Go to File > Open and choose the WILCS02_WINCS02_GUI.py file.

    Figure 7-3. Opening WILCS02_WINCS02_GUI.py
    Figure 7-4. Opening WILCS02_WINCS02_GUI.py
  4. Go to Run>Run Module to execute the WILCS02_WINCS02.py file.

    Figure 7-5. WILCS02_WINCS02.py
  5. The “Python 3.11” shell window displays the following message:
    Figure 7-6. Check Run WILCS02_WINCS02.py Status
    Note: If the shell window displays an error message, check if the source code is from the original MCHPRT3_Setup.exe installation folder.
  6. Select the WILCS02_WINCS02.dll file to load the library and run the example code.

    Figure 7-7. WILCS02_WINCS02.dll
  7. The following figure illustrates the Python shell window. After successfully loading the WILCS02_WINCS02.dll file, the Python shell window displays the .dll file version. In the Python shell window, users can reference the GUI run process to design a tool for themselves.
    Figure 7-8. Successful Loading of WILCS02_WINCS02.dll
  8. The following figure illustrates the WILCS02_WINCS02 GUI Python example.
    Note: Check if the version matches the device HUT code firmware version.
  9. Select the device connect “COM Port” and click Connect to connect the WILCS02_WINCS02 device.
    Figure 7-9. Python Example GUI
  10. The following warning pop-up window appears after connecting the WILCS02_WINCS02 device. Click Yes to Reset the WILCS02_WINCS02 device.
    Figure 7-10. Warning
  11. After a successful connection, the following WILCS02_WINCS02 GUI Python example window appears.
    Figure 7-11. Python Example GUI