sudo docker build -t serial_receiver .
sudo docker ps
and copy the new IMAGE_ID- Paste the new IMAGE_ID into the
image
variable of thedocker-compose.yml
file - To start the container:
docker-compose up
- Changed from Static parameters to Dynamic parameter values.
- Parameters stored into
.env
file - Docker-Composed is used to pass parameters
- when you insert static variabes we do not use the docker compose, nor
.yml
is needed
sudo docker build -t serial_receiver .
sudo docker run -t -i --device=/dev/ttyACM0 IMAGE_ID
- by using the --device flag we give access to the dev directory through which we receive our data
Our goal is to receive sensor data from the STM32 Microcontroller via computer and store those data in our MongoDB Local Server. Because we use different computers and Microcontrollers between Lab and Office.
FROM python3
environment as the basic docker layer (n)COPY receive_from_serial_port.py
additional layer (n 1) for the executable programRUN pip3 install pyserial pymongo
additional layer (n 2) for the packages needed from the executable programCMD []
additional layer (n 3) for the execution
- STM32MP15 Microcontroller executes in a continues loop a program which reads from sensors and dispatch these sensor data via Serial Port
- A Linux Computer reads via the Serial Port sensor data from the STM32MP15 Microcontroller
- These data are stored in a MongoDB and they have a json shape
All .json file data will have the following info:
- Experiment type (SR-CAMMS, UW-CAMMS, or VS-CMS) <= type: String
- Experiment notes: (a text box in the client for the user to put some notes on the experiments being performed) <= type: String
- Mode (raw_data, or processed spectra) <= type: List of Float Values
- client start timestamp (Justin - is the current format easily convertible to a date/time?) <= type: Float
- experiment start <= type: Float
- current acquisition number <= type: Float
- current acquisition timestamp <= type: Float
- gain <= type: Int
- frame cound <= type: Int
- discard frames <= type: Int
- frame delay <= type: Int
- temperature <= type: Float
- data directory <= type: String
- data file (raw or processed spectra) - the data could be included as part of the .json file <= type: String
- gain file <= type: String