Template:PT3 PYTHON WIN VS: Difference between revisions
From Phidgets Support
(Created page with "<div class="phd-slide-deck" data-deck="PT3_PYTHON_WIN_VS"> <div class="phd-slide-deck-header"><h3>Language - Python</h3></div> <div class="phd-slides"> <div class="phd-slide">...") |
No edit summary |
||
Line 17: | Line 17: | ||
<div class="phd-slide"> | <div class="phd-slide"> | ||
<h2> | <h2>Installing the Phidget Python Module</h2> | ||
<p>First, | <p>First, install <span>[https://www.python.org/downloads/ Python3]</span> if you haven't already.</p> | ||
<p> | <p> | ||
You can install the Phidget22 libraries and python module for your current Visual Studio project with PIP by opening | |||
<b>View > Other Windows > Python Environments</b> | |||
</p> | |||
< | <div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_VS/-x325/50/VisualStudio_PythonEnvironments.png"></div> | ||
</div> | </div> | ||
Line 29: | Line 32: | ||
<h2>Installing the Phidget Python Module</h2> | <h2>Installing the Phidget Python Module</h2> | ||
<p> | <p>Next, select <b>Packages (PyPI)</b> from the drop-down menu:</p> | ||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_VS/-x350/50/VisualStudio_PythonPackages.png"></div> | |||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_VS/- | |||
</div> | </div> | ||
<div class="phd-slide"> | |||
<h2>Installing the Phidget Python Module</h2> | |||
<p>Type <b>Phidget22</b> into the search bar, then click <b>Install Phidget22</b>:</p> | |||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_VS/-x320/50/VisualStudio_Install_Phidget22.png"></div> | |||
<p>Success! Your project now has access to Phidget22.</p> | |||
</div> | </div> | ||
<div class="phd- | |||
< | <div class="phd-slide"> | ||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_VS/- | <h2>Setting Up a New Project</h2> | ||
<p> | |||
When you are building a project from scratch, or adding Phidget functionality to an existing project, you'll need to configure your development environment to | |||
properly link the Phidget Python library. | |||
</p> | |||
<p>To start, create a new Python project:</p> | |||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_VS/-x295/50/Python_vs_newproject.png"></div> | |||
</div> | </div> | ||
<div class="phd-slide"> | |||
<h2>Setting Up a New Project</h2> | |||
<p>Then open the Python file that was generated with the project.</p> | |||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_VS/-x350/50/Python_vs_blank_project.png"></div> | |||
</div> | |||
<div class="phd-slide"> | |||
<h2>Finding Code Samples</h2> | |||
<p> | |||
To find the code sample to use for your Phidget, navigate to the <span>[https://www.phidgets.com/?view=code_samples&lang=Python Code Samples]</span> page and | |||
select your device from the drop-down menu. | |||
</p> | |||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_VS/-x250/50/Python_sample_code.png"></div> | |||
<p>Once you select your device, the code sample generator will give you a working code sample, and a selection of options to customize it to your needs.</p> | |||
</div> | </div> | ||
<div class="phd-slide"> | |||
<h2>Using the Code Samples</h2> | |||
<p>If it's unclear what any of the options do, click on the nearby <b>'?'</b> for more info.</p> | |||
<p>Once you've made your selections, click the copy button and paste the code into your new project.</p> | |||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_VS/-x320/50/Python_Sample_Code_Copy.png"></div> | |||
</div> | </div> | ||
< | <div class="phd-slide"> | ||
<h2>What's Next?</h2> | |||
<p>{{Slide_Deck_PT3_Outro}}</p> | |||
</div> | </div> | ||
</div> | </div> |