Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Einleitung → Bildchen's der module



The modules of the the AnalogMax series offer software demonstrations of their basic functionality and
communication interface.

This manuel manual provides a step by step guide for installing the required software and running the demos in general.

For the ease of access- and programability program -ability the programming language Python (since version 3.5) has been chosen.
The project Jupyter provides an excellent and open source entry for beginners and professionals.
Jupyter files are called Notebooks and have the ending name fileName.ipynb, this manuel manual refers to them as demo.

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

So running and editing the Demos requires the following steps:

  • Step 1 - Installation of Anaconda respectively jupyter
  • Step 2 - Installion Installation of "pyserial"
  • Step 3 - Driver installation for the module
  • Step 4 - Making the demos accessible for jupyter Jupyter
  • Step 5 - Starting Jupyter
  • Step 6 - Opening a demo
  • Step 7 - Alter the comport to yours
  • Step 8 - Run Running the Notebookdemo
  • Annotations


Installation of Anaconda respectively

...

Jupyter

The simplest way to get execute the demos running in Jupyter is accomplished throw the installion installtion of Anaconda.
This will install more than is needed but nearly all requierementsin requirements in one step.

The Anaconda website provides detailed instructions on how to install the application, just follow the link
http://docs.anaconda.com/anaconda/install/windows/
If the installer offers you the installation of optional application, just skip those, they are
not needed to run the demos or edit their code.

...

At least with Anaconda installation on Windows, pyserial (python serial port support library) is not
included and has to be installed. This can be done froma from the Anaconda command prompt. To open the
Anaconda command prompt, just press the windows key, type Anaconda prompt and open it. Enter

...

into the command prompt an press enter. This starts the search for software dependencies of pyserial,
to prceed you are asked to confirm the installtioninstallation, to proceed press Y to confirm.
The console shows a message when pyserial is installed and thereafter the console is no longer needed
and can be closed.

...

The communication with a module supposes a comport, and therefor therefore a driver is requieredrequired.
When connecting the modul module with your computer, windows starts the Automatic driver Installation,
but often the automatic driver installation fails and the driver needs to be installed manually.

So it is best practice to connect the module, give the opperation operation system some time, and check
afterwards in the device manager for the apperance appearance of a "comport" and two devices labeld labelled
"USB Serial Convert A and B".

The device manager can be opened either via a right mouse click onto the windows symbole symbol
or by pressing the windows button and typing device manager.

When instead two devices labeld labelled "Arrow USB Blaster" are listed under "other devices", the manuell manual
approach has to betakenbe taken.

Update driver / context menu

Through a right mouse click on each device, a context menue menu opens. Chose "Update driver" afterwordds afterwords chose
"Search automatically for updated driver software", this proper driver installtion installation changes the devices names
into USB Serial Converter A & B, in addition, also the a comport is installed.

...

In dependency to the modules firmware, the driver installation can lead to the appearance of two comports,
in this instance, the higher numbered comport is of importance.

Making the demos accessible for

...

Jupyter

The demos for a module are compressed into a zip archieve archive and need to be extracted, to be accessible for
Jupyter. Jupyter has access to the user folder, so a convenient way is to copy the extracted demo folder
into your users folder, for example:

C:\Users\Username\distribution-folder

Starting Jupyter

Alternative kann man auch einfach nur Jupyter starten, es öffnet sich als Konsolenfenster, dass nicht
geschlßen werden, wohl aber minimiert werden darf

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

Jupyter is based on the server client structure, the server is executed in the background, and the client is a webpage
inside your default browser.

So opening it starts the server, which opens a console
Opening it does several things,
leads to the start of the Jupyter server, and a consol, which displays status messages of the Jupyter
server.
The console must be open all the time, you want Jupyter to run. You can minimize it. Simultaneously the Jupyter client is opened als a page inside your default browser.

When you no longer

it opens a console, in which Jupyter messages are displayed and also your default browser

press the windows key and type Anaconda
Navigator. Anaconda opens and to open jupyter, click launch, in the screenshot below, marked within
the red rectangle.

Image Removed

The application opens a tab inside your browser which displays your user folder.

Opening a demo

Image Added

Opening a demo

To open a demo, one hat to navigate to the desired demo via the Jupyter tab. The Jupyter tab inside your browser
displays your user folder, left clicking on a folder opens it. Clicking on a demo file opens it inside its tabIn our case, a left click on the demo
folder opens it an from there one can open a demo.

In the pictures below the steps are :shown.

  • Home folder / Jupyter tab
  • Folder - AnalogMax
  • Demo - AnalogMax_Accelerometer_Demo

Image Removed

...

Image Added

Alter the comport to yours

Every demo communicates with the module by a serial communication port. This port has been assigned
a number during the driver installation. In our case it is COM5.
At the beginning of the demo is a line:

ser = serial.Serial('COM5', 115200)

Replace the comport number in red with yours and save this change by pressing "s" whilst holding the
control key (Ctrl + s).

Running the demo

A notebook consists of cells, in which its content is. Demos so far only contain one cell. to run it, the PC's focus must
be upon the cell, left clicking into the cell focuses this cell.

Image Added
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.

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

Often demos gather data from the module and display them in graph plots.

Annotations

  • The demos are linked to Jupyter through the import and use of only the following modules:
    IPython (Interactive Python) -

...

  • Interacting from the Notebook
    ipywidgets - Interactive Widgets/GUI elements for the Jupyter Notebook

Step 7 - Show linenumber / Starting with clearing the caches

Clicking on the folder AnalogMax opens it.

Choose a demo and another click opens

...

  • Show linenumbers inside a notebook: View → Toggle Line Numbers


Inerface of TEI0015-02