Skip to end of metadata
Go to start of metadata

Example picture

Overview

The modules TEI0015, TEI0016 and TEI0023 offer software demonstrations of their basic functionality and communication interface. This manual provides a step by step guide for installing the required software to run the demo "Jupyter Demo FFT".

For the ease of accessibility and programmability the language Python (since version 3.8) has been chosen. Jupyter provides an excellent and open source entry for beginners and professionals. Jupyter files are called Notebooks and have the ending .ipynb, this demos source code is contained within a Notebook file.

The following description of steps applies in its details to computers running windows 10, for other operation systems, the steps are in general similar.

Download

The demo is available through a link in the parent page.

The download is a folder, containing all the necessary files and documents. The download folder is compressed into a zip archive and needs to be extracted, to be accessible for Jupyter.

Making the demos accessible for Jupyter

Jupyter's file system access is limited to the user folder, so a convenient way is to copy the extracted demo folder into your users folder, for example:

C:\Users\Username\download-folder

Content of the zip

Content of the zip archive - TEI00XY-0x-08-C8A_Jupyter-Demo-FFT-vX.Y_quartusXY.Z_JupX.Y_JupLX.Y_YearMonthDay-Time .zip :

  • Folder "Jupyter Demo":
        The Notebook / Demo - TEI00-15-16-23_Jupter-Demo-FFT-vX.Y .ipynb
        A python code module - TEI00xyCodeModule .py
  • Folder "Setup-Notebooks":
        The Notebook - Python_install_module_dependencies .ipynb
        The Notebook - Performs_modifications_to_JupyterLab .ipynb
        The Notebook - List_required_modules .ipynb
  • Board configuration file TEI00xy... .pof
  • Manual

Installation of "Anaconda Individual Edition" respectively Jupyter and JupyterLab

The simplest way to execute the demos in Jupyter is accomplished through the installation of "Anaconda Individual Edition" which is free and Open-source. This will install more than is needed but nearly all requirements in one step.

The Anaconda website provides detailed instructions on how to install the application, just follow this link.

It is generally advised to use the default settings of the Anaconda installer. If the installer offers you the installation of optional applications, just skip those, they are not needed to run the demos or edit their code.

Starting Jupyter

To open Jupyter, press the windows key and type Jupyter, this presents "Jupyter Notebook (AnacondaX)" to you, from which one can start Jupyter.

Jupyter is based on the "Client-server structure", the server is executed in the background, and the client is a webpage inside your default browser. This webpage allows to navigate through the file system and to open and execute the Notebooks.

So opening Jupyter begins by starting the server, which is presented as a console displaying status messages of the server, shortly after, the webpage will be opened.
The console must be open all the time, you want Jupyter to run. You can minimize it.

Using the Jupyter tab to navigate to a Notebook

The following is a general explanation on how to navigate via the Jupyter browser page. Generally, the Jupyter tab inside your browser is in itself a file browser. Jupyter has access only to your user or home folder which it displays after the program start. To start a notebook, one has to navigate to the folder containing the notebook file.

Left clicking on a folder opens it. Going back or a level up is accomplished by clicking the back button of your browser.

In the picture below these steps are exemplarily shown:

  • Jupyter tab - Home folder
       →   Download folder
  • Download folder
       →   Demo folder
  • Demo folder
       →   Demo Notebook

Executing a Notebook

A notebooks browser tab is the combination of a simple IDE together with the capability to directly run scripts.

A notebook consists of cells, in which its content, the applications source code resides. The code can easily be altered and directly executed from within the cell. The output of a cell for data, tables, graphs and GUI elements are below a cell. To a notebook can Cells be added or removed.

Before executing a Notebook, the PC's focus must be upon the cell, left clicking into the cells source code focuses this cell.



Now the demo can be run through pressing the Run button,
stopped by the button with the black rectangular,
reloaded through the circular arrow and lastly
reloaded and rerun by the two arrowed button.

Important! When the code of a Notebook was changed, one has to reload the Notebook.

The notebook can be closed either by closing the tab or via File → "Close and Halt".

Installation of Python software modules

Use the Jupyter browser tab to navigate along the path:
   →   Jupyter tab - Home folder
       →   Extracted demo archive :   TEI00XY-0x-08-C8A_Jupyter-Demo-FFT-vX.Y_quartusXY.Z_JupX.Y_JupLX.Y_YearMonthDay-Time .zip
           →  Folder:   Setup-notebooks
                Content:
                 Python_install_module_dependencies.ipynb
                 Performs_modifications_to_JupyterLab.ipynb
                 List_required_modules.ipynb

To install the missing Python code modules for this demo ( serial/ pyserial/ ipympl ), the Notebook Python_install_module_dependencies.ipynb has to be executed. This installs the required Python software modules.

After installation of the modules, Jupyter needs to be restarted.

JupyterLab requires also the execution of the Notebook Performs_modifications_to_JupyterLab.ipynb to function correctly ( This modifies the output for interaction with matplotLib ). Afterwards, JupyterLab can be started.

Executing the Demo Notebook

The parent page provides a link to a detailed description on how to use this Demo and install the module driver.

Connect a module via USB, if necessary install the driver. Every demo communicates with the module by a serial COM-port. This port has been assigned a number during the driver installation. This Demo notebook contains a graphical user interface. The available COM-ports will be scanned when the Notebook is executed. They are presented and selectable through the GUI. The Notebook containing the Demo TEI00XY_Jupter-Demo-FFT_vX.Y .ipynb is stored along the path:

   →   Jupyter tab - Home folder
       →   Extracted demo archive :   TEI00XY-0x-08-C8A_Jupyter-Demo-FFT-vX.Y_quartusXY.Z_JupX.Y_JupLX.Y_YearMonthDay-Time .zip
           →  Folder:   Jupyter-Demo
                Content:
                 TEI00XY_Jupter-Demo-FFT_vX.Y .ipynb
                 TEI00xyCodeModule.py

As an option, a default COM-port can be set at the beginning of the notebook and the style of the FFT plot can be altered from logarithmic to linear. At the bottom of the Notebook, the size of the graphs can be altered.

Annotations

  • The demos are only linked to Jupyter through the import and use of the following modules:
    IPython - Interacting from within the Notebook with its output / plots
    ipywidgets - Interactive Widgets/GUI elements for the Jupyter Notebook
  • Show line numbers inside a notebook: View → Toggle Line Numbers
  • Autocomplete is available when pressing the Tab key

  • Variables of a notebook cell are not encapsulated from other cells inside the same notebook


  • No labels