2. Installing Atom Pymakr plugin
3. Upgrading Pycom boards firmwares
5. Installing GitHub Desktop [optional]
7. Downloading course material
Atom is an Integrated Development Environment (IDE), providing convenient features to edit Python code (among many others): syntax highlighting, completion, auto-indentation, integration with Git, bash, ...
We will use Atom to write Python code during the labs sessions.
To install it, download the installation file for your Operating System here: https://atom.io/
The Python code written will not be executed in your local machine. Instead, you need to transfer it to your IoT device (in our case Pycom Lopy). To do so, Pycom developed a plugin named Pymakr that will facilitate the execution and syncing of Python to the device.
To install the plugin in Atom:
- Open Atom
- In top menu: Atom ► Preferences...
- And write
pymkr
in the input box under theInstall tab
(followed byEnter
):
Pycom devices are under constant development and improvement. You must make sure you have the latest firmware version installed.
Firmware upgrading procedure is documented here: https://docs.pycom.io/chapter/pytrackpysense/installation/firmware.html
Python comes in different flavours: different versions and different environment of libraries. Moreover, a Python's version is most probably already installed in your machine.
So in order to not screw up your installation, it is advised to install Anaconda https://anaconda.org/ which provides a very convenient way to run various Python version with various set of Python modules and libraries in an isolated and safe way.
For our labs, we will use Anaconda version 3.6 https://www.continuum.io/downloads
Once installed (Anaconda with Python version 3.6 by default), we want now to install Python 2.7 as well. To do so:
- Open
Anaconda Navigator
- Click on
Environments
tab - Ckick on the arrow on the right of
root
item Open Terminal
Documentation on how setting up various Python versions and environments in Anaconda https://conda.io/docs/py2or3.html
In the terminal:
-
to know your current Python version:
python --version
-
to get a list of existing environments:
conda info --envs
Now, to create a new environment with Python version 2.7:
conda create -n py4data-2.7 python=2.7 anaconda
py4data-2.7
being the name of your environment.
FileZilla will be used occasionnaly to synchronize or retrieve file from IoT device via ftp and Wifi of the device itself.
Download the FileZilla ftp client here: https://filezilla-project.org/
Git is a version control system (VCS) for tracking changes in computer files and coordinating work on those files among multiple people.
GitHub is a web-based Git or version control repository facilitating collaborative software development.
We will cover only the very basics of Git during these labs and will use GitHub Desktop standalone. If you want to have a deeper understanding, you can look at this free online course at Udacity: https://www.udacity.com/course/how-to-use-git-and-github--ud775
So, download it here: https://desktop.github.com/ and install it.
PuTTY will be used to initiate SSH communication with a Raspberry PI. If you have a machine with OSX or Linux installed you can use directly the ssh
program available in a terminal. If you have a Windows machine, you can use PuTTY instead.
You can download PuTTY using this link: http://www.putty.org and install it (download the installer and double click on it).
To copy files from your machine to the Raspberry PI or the opposite over the SSH protocol, you can use the scp
command under OSX or Linux. Under Windows, you can use the pscp.exe
program that you can download here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Course material can be download as a zipped
archive here.
On most platforms, once the Atom Pymakr package installed, you will be in a position to communicate with Pycom devices via the USB port without any issue.
In the case of Windows 7, you will need to install an additional driver. The procedure is documented in Pycom documentation at the following url: https://docs.pycom.io/chapter/pytrackpysense/installation/drivers.html
Alternatively, you can find as well the required driver here ../softs/windows/pycom.inf