From 2e915b9f86383eae60c1fa4a7bdaf5b82a4678ec Mon Sep 17 00:00:00 2001 From: nb-e Date: Fri, 3 Nov 2023 15:30:57 -0400 Subject: [PATCH] add stir pause conf.yml + added wiki ref in readmes --- README.rst | 19 ++--- evolver/alternate_conf_files/readme.md | 32 +------- .../stir_pause_on_OD/conf.yml | 73 +++++++++++++++++++ 3 files changed, 84 insertions(+), 40 deletions(-) create mode 100644 evolver/alternate_conf_files/stir_pause_on_OD/conf.yml diff --git a/README.rst b/README.rst index 8444897..9efde06 100644 --- a/README.rst +++ b/README.rst @@ -1,21 +1,18 @@ eVOLVER Server Code =================== -This code sits on the eVOLVER raspberry pi and handles communications between the DPU and the SAMD21 microcontrollers that monitor and actuate experimental parameters. Calibrations, experiment commands, and data transmission are all handled by this code using `python socket-io `_ and `pyserial `_. +This code sits on the eVOLVER Raspberry Pi and handles communications between the DPU and the SAMD21 microcontrollers that monitor and actuate experimental parameters. Calibrations, experiment commands, and data transmission are all handled by this code using `python socket-io `_ and `pyserial `_. + +For more information check the `wiki `_. Installation ============ -eVOLVER units should come with this software pre-installed. If you need to, you can install all dependencies by running the following command: - -``python3.6 setup.py install`` - -NOTE: You must use python3.6 at this point in time - some of the dependencies currently do not work on 3.7. +eVOLVER units should come with this software pre-installed. -Running the server -================== - -We use `supervisor `_ to run and manage the logs for the eVOLVER server. eVOLVERs should come pre-configured. We also provide a utility monitoring and restart script, ``evolvercron`` and ``server_monitor.sh``. To use, add the crontab job line in ``evolvercron`` into your cron installation. +If you are making an eVOLVER from scratch or are replacing a broken Raspberry Pi, you can follow these guides: +* `Raspberry Pi configuration `_ +* `Updating the eVOLVER server `_ Calibration Conversion ====================== @@ -23,5 +20,3 @@ Calibration Conversion If you desire to update an older evolvers calibrations to the current release formatting, use the script located at ``utls/calibration_transformation.py``. To run: ``python3.6 utils/calibration_transformation.py -d evolver/calibrations -f evolver/calibrations.json`` - - diff --git a/evolver/alternate_conf_files/readme.md b/evolver/alternate_conf_files/readme.md index 706dcbe..c6eb491 100644 --- a/evolver/alternate_conf_files/readme.md +++ b/evolver/alternate_conf_files/readme.md @@ -5,33 +5,9 @@ Server Configuration Files (conf.yml) Configuration files (conf.yml) contain the parameters for the server to run. -More complex conf.yml files including 'pre' and 'post' commands are complicated to repeatedly alter, so storing them allows easy switching to files for different purposes. - -## Definitions -subcommand = a command added to the command queue when another command is run - -An example subcommand: -``` -- param: 'od_led' - value: ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'] -``` - -'pre' or 'post' command = a list of subcommands to be added to the command queue before or after the main parameter command - -'values' = a keyword referencing the current value of a parameter in the conf file (for example, the subcommand) -``` -- param: 'temp' - value: 'values' -``` - -'wait' = a special type of subcommand that makes the server pause for that many seconds (for example so that a command can execute) -``` -- param: 'wait' - value: 15 -``` - +For more information check the wiki [page](https://khalil-lab.gitbook.io/evolver/software/server-code-structure/configuration-files-conf.yml). ## Examples of potential alternate conf files -Calibration conf - broadcast_timing parameter should be low to speed up calibration - -Experiment conf - the OD LED might need to be normally off unless OD is read to prevent the light affecting sensors +- Calibration conf - (default conf) broadcast_timing parameter should be low to speed up calibration +- stir_pause_on_od - prevents stirring from affecting OD. Important if bubbling or in low volume applications +- odled_normally_off - OD LED will be normally off unless OD is read to prevent the IR light affecting other light sensors diff --git a/evolver/alternate_conf_files/stir_pause_on_OD/conf.yml b/evolver/alternate_conf_files/stir_pause_on_OD/conf.yml new file mode 100644 index 0000000..3140589 --- /dev/null +++ b/evolver/alternate_conf_files/stir_pause_on_OD/conf.yml @@ -0,0 +1,73 @@ +--- +# eVOLVER experimental parameter configurations +experimental_params: + od_90: + recurring: true + fields_expected_outgoing: 2 + fields_expected_incoming: 17 + value: '1000' + pre: + - param: 'stir' + value: ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'] + - param: 'wait' + value: 15 + post: + - param: 'stir' + value: 'values' + od_135: + recurring: true + fields_expected_outgoing: 2 + fields_expected_incoming: 17 + value: '1000' + od_led: + recurring: true + fields_expected_outgoing: 17 + fields_expected_incoming: 17 + value: ['4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095'] + temp: + recurring: true + fields_expected_outgoing: 17 + fields_expected_incoming: 17 + value: ['4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095'] + stir: + recurring: false + fields_expected_outgoing: 17 + fields_expected_incoming: 17 + value: ['8', '8', '8', '8', '8', '8', '8', '8', '8', '8', '8', '8', '8', '8', '8', '8'] + pump: + recurring: false + fields_expected_outgoing: 49 + fields_expected_incoming: 49 + value: null + lxml: + recurring: false + fields_expected_outgoing: 17 + fields_expected_incoming: 17 + value: ['4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095','4095'] + +# eVOLVER server parameter configurations +broadcast_timing: 60 +num_sleeves: 16 +port: 8081 + +# RPi file locations and names +device: evolver-config.json +calibration: calibration.json +calibrations_directory: calibrations +fitted_data_directory: fittedCal +raw_data_directory: rawCal +od_calibration_directory: od +temp_calibration_directory: temp + +# Serial communication +serial_end_outgoing: "_!" +serial_end_incoming: end +serial_port: '/dev/ttyAMA0' +serial_baudrate: 9600 +serial_timeout: 0.3 + +recurring_command_char: r +immediate_command_char: i +echo_response_char: e +data_response_char: b +acknowledge_char: a \ No newline at end of file