FREE - Framework for Remote Experiments in Education

From wwwelab
Revision as of 17:41, 12 August 2021 by Ist187344 (talk | contribs)
Jump to navigation Jump to search
  1. TODO Ainda estou a escrever(Rossa)

Pre-requisites

Build environment

  • Git (2.30.2+)
  • Python (3.7.0+)

Install

Raspberry PI Server (RPI_Server)

Setup python3 environment variable pointing to run the version installed (in this exemple is for python3.7) by:

   $ sudo nano ~/.bashrc

edit it adding to the end:

   $ alias python3="python3.7"

First checkout the project from github:

   $ git clone https://github.com/e-lab-tecnico-ulisboa-pt/RPi_Server-PG

then edit the "main.py" file and change the following global variables:

   SERVER = "main_server_IP"
   MY_IP = "RPi_IP"
   SEGREDO = "password"
   PORT = Port_to_comunication
   BINARY_DATA_PORT = Port_to_transfer_Binary_data

Main Server (Main_Server)

This sowftware is the thispatcher of the information. By allowing the communications form the frontend and each RPi_Server responsable for a experience. To install this you need to install at least Python 3.7 and the lib Flask (https://pypi.org/project/Flask/).

Then go to the project from github:

   $ git clone https://github.com/e-lab-tecnico-ulisboa-pt/Main_Server-RexC

Edit the "main.py" file and change the following global variables:

   SERVER = "main_server_IP"
   MY_IP = "RPi_IP"
   SEGREDO = "password"
   PORT = Port_to_comunication
   BINARY_DATA_PORT = Port_to_transfer_Binary_data

After that you need to change or edit this last one variable "segredos",

ADD the new experiment.jpg

the struct of the is the following: {"RPi_IP":{"segredo":"password","nome":"Name_of_the_exp"},...}

Config File JSON

In the project of the Main_Server there is a folder called Configs, in there are all the configuration files of the experience linked to the Main_Server, so to add a new experiment you just have to copy one of the existing files and change its name to the experiment's and change the parameters in the config file:

Config JSON.jpg

After having this changes done you can run the Mian_Server by typing on the cmd:

   $ start.bat