In this tutorial, we will introduce how to set-up a Python coding environment for VIA Pixetto.
This tutorial includes five steps in total
Step 1: Download Python
Step 2: Use ‘pip3’ to download the packages required for VIA Pixetto
Step 3: Download Jupyter Notebook
Step 4: Download VIA Pixetto’s function database
Step 5: Set-up Jupyter Notebook file
First, we need to download Python.
Open the website ( https://www.python.org/ ) and head to the ‘Downloads’ drop down menu.
Select ʻPython 3.X.Xʼ to download Python.
Check ʻInstall launcher for all users (recommended)ʼ and ʻAdd Python 3.8 to PATHʼ then click ʻInstall Nowʼ.
Once the ʻSetup was successfulʼ window appears, this means you have successfully downloaded Python!
To make sure VIA Pixetto can operate in Python’s coding environment, we need to download ʻpyserialʼ package.
First, type ʻcmdʼ into the search bar in the lower left corner of the screen and open ʻCommand Promptʼ.
Insert the command：
pip3 install pyserial
Download Jupyter Notebook to code with Python.
Open ʻCommand Promptʼ, then insert the following command into the window:
pip3 install jupyter
Create a folder on your personal computer as your Project Folder.
The new folder must include the Pixetto library.
i. Click the link ( http://cdn.viaembedded.com/Pixetto/python3-pixetto-0.0.1.zip ) to download.
ii. Unzip the downloaded file to get ‘pixetto.py’ and other files.
iii. Copy all files into your newly created Project Folder.
Open Jupyter Notebook in Project Folder.
A. In ‘Command Prompt’, change the path to your newly created folder.
i. Copy the folder path
ii. Insert command ʻcdʼ to switch paths.
B. After switching path, insert the command:
The computer will automatically open ‘localhost’ window. Select ‘New’ and then select ‘Python 3’.
Now, you can program VIA Pixetto using Python on this webpage.
Make sure to keep ʻCommand Promptʼ open while coding.
Congratulations with finishing the Python coding environment set-up for Pixetto! You can now experiment with your own coding creations on your computer. Have fun and donʼt forget to share your projects with #VIAPixetto on social media!