Step 6.1: Run PAC1934 Sample Applications
1
Running the Python Demo Application
1. Navigate to the Python directory:
# cd ~/python
2. Run the Python demo application by executing the command below:
# python demo.py
You should see the output shown in the following screenshot after executing the command above. You should also observe the OLED W Click display the PAC1934 demo logo during initialization.
After initialization, your terminal should look like the screenshot below:
- The Python demo uses VT Commands to manipulate the cursor position on the terminal
- If you encounter an issue where the terminal output looks jumbled, try maximizing the terminal window and/or the VirtualBox window on your host machine
The OLED W Click display should look like the picture below:
3. Press the USER button on the SOM1-EK to change the PAC1934 channel displayed on the OLED W Click.
4. To end the demo, press Ctrl+C.
2
Running the C Demo Application
1. Run the C demo application by executing the command below:
# /root/pac193x_sample_application
You should see the output shown in the following screenshot after executing the command above. You should also observe the OLED W Click display the PAC1934 demo logo during initialization.
After initialization of the C demo application, your terminal should look like the screenshot below:
- The C demo also uses VT Commands to manipulate the cursor position on the terminal
- If you encounter an issue where the terminal output looks jumbled, try maximizing the terminal window and/or the VirtualBox window on your host machine
The OLED W Click display should look like the picture below:
2. Press the USER button to change the PAC1934 channel displayed on the OLED W Click.
3. To end the demo, press Ctrl+C.
Conclusions
This tutorial provided you with training for configuring a PAC1934 Integrated Circuit (IC) to continuously monitor key meter parameters using the PAC1934 Linux® driver in an embedded Linux host. As a next step, you may customize the project to reconfigure the resistor values and display different measurements. The PAC1934 IC is capable of handling up to 32V Vbus voltage and +/- 100 mV differential voltage range. You can also investigate the Application Programming Interfaces (APIs) available in the project source files to add functionality from the sample applications to your own application.