3.7.2 How to Run Python 3.6 Environment
The following are the steps to run the Python 3.6 environment:
- Open IDLE (Python 3.6 32-bit) in the Python 3.6 folder from the Start menu.
Figure 3-32. Python 3.6 Package - The following figure illustrates the IDLE window of Python 3.6.
Figure 3-33. Opening Window of IDLE - Go to File>Open and choose the
PIC32MZ2051W1_GUI.py
file (see the following figure).Figure 3-34. Opening PIC32MZ2051W1_GUI.py
File - Go to Run>Run Module to execute the
PIC32MZ2051W1_GUI.py
file.Figure 3-35. Run Module - The Python 3.6 shell window displays the following message:
Figure 3-36. Python Shell Window Message Note: If the shell window displays an error message, check if the source code is from the originalMCHPRT3_Setup.exe
installation folder. - Select the
PIC32MZ2051W1.dll
file to load the library and run example code.Figure 3-37. Opening PIC32MZ2051W1.dll
- The following figure illustrates the Python shell window. After successfully loading the
PIC32MZ2051W1.dll
file, the Python shell window displays the.dll
file version. In the Python shell window, the user can refer to the GUI running process to design a tool for themselves.Figure 3-38. .dll
File Version of PIC32MZ2051W1 - The following figure illustrates the PIC32MZ2051W1 GUI Python example.Note: Check if the version matches the device HUT code firmware version.
- Select the device “COM Port”, COMX, and click Connect to connect the PIC32MZ2051W1 device.Note: COMX – “X” stands for the port number of the PC that the device is connected to.
Figure 3-39. PIC32MZ2051W1 GUI Python Example - The following warning pop-up window appears after connecting the PIC32MZ2051W1 device. Click Yes to Reset the PIC32MZ2051W1 device.
Figure 3-40. Reset PIC32MZ2051W1 Device Warning Message - After successful connection, the following PIC32MZ2051W1 GUI Python example window appears.
Figure 3-41. Successful Connection of PIC32MZ2051W1 GUI Python Example Window