Setup Instructions for Running the Program in Jupyter Lab.
.pkg
file and follow the on-screen instructions. sudo apt-get update
sudo apt-get install python3 python3-pip
Open the terminal or command prompt and run:
python --version
pip --version
In the terminal or command prompt, run:
pip install jupyterlab
Once installed, you can start Jupyter Lab with the following command:
jupyter lab
Run the following commands in the terminal to install the required libraries for your program:
pip install tkinter
pip install customtkinter
pip install pyserial
pip install nbconvert
pip install pyinstaller
In Jupyter Lab, create a new notebook by selecting Python 3 as the kernel. Then copy and paste the code. Press shift+enter and you could see the app like this:
If you prefer, you can convert the Notebook to a Python file and then create an executable file in the dist folder, using the following commands:
jupyter nbconvert --to python Interfaz_HVPG.ipynb
pyinstaller --onefile Interfaz_HVPG.py
7.1 Selecting the COM Port
! Caution ! ! Make sure the port is not in use, such as with the Arduino interface, if you are loading the program on the ESP32 master.
7.2 Selecting the Channel
7.3 Adjusting Amplitude, Frequency, and Pulse Width
!! Warning !! !! The amplitude value must be between 0 and 255. If you define a value outside this range you will not be able to send the data. If you need operate a lower frequencies, you could modify the LC filter. Please check this section, 6. High Frequency Transformer.
Vpeak at 70KHz | Vpeak at 100KHz |
!! Warning !! !! Frequency must be between 50 and 100 KHz and with a step of 1 kHz. If you define a value outside this range you will not be able to send the data.
i Note i i It is recommended to use a pulse width greater than 100us due to the activation time constant of each channel of the high voltage pulse generator. Consider that the deactivation time of each channel is approximately 30us.
7.4 Applying and Sending the Settings
Sending data by serial port: {"frequency": 100, "pot_value": 255, "pulse_width": 200, "channel": "CH1"}
ESP32 response: Data to send: 0x64FFC801
</div>
>i **Note**
>i
>i Ensure that the values are within the acceptable ranges; otherwise, an error message will be displayed.