- Python >= 3.7.9
- PSoC Creator == 4.4
- python-pip >= 20.3.3
- PSoC 5LP
- LIS3DH
- TMP36 (Temperature sensor)
- 24LC512 (Ext. EEPROM)
For a basic installation it's required to run these commands on a prompt.
# 1. Installing virtualenv
pip install virtualenv;
# 2. Creating empty virtual environment
mkdir venv && virtualenv venv;
# 3. Activating virtual environment
.\venv\Scripts\activate;
# 4. Managing the requirements
pip install -r win_requirements.txt;
garden install graph
Be sure python-pip is installed on your sistem and that the user is a member of uucp or dialout group.
There are two sh scripts that automate installation and run process. The first one is requiring SU privileges in order to install python-pip.
# Allowing the scripts to be executable.
chmod +x RUN.sh INSTALL.sh
# Running installation script. Application will start after this command.
./INSTALL.sh
NB: tested on an Artix linux machine with pacman as package manager and an iMac running macOS Big Sur. The user is kindly asked to check for pip availability on his/her system.
Run this block if something went wrong during installation through shell script.
# 1. Installing python-pip (Arch based distribution. change package manager if required)
sudo pacman -Syu
sudo pacman -S python-pip
# 2. Appending $USER to the group uucp
sudo usermod -a -G uucp $USER
The procedure is identical. Dependencies are slightly different.
# 1. Installing virtualenv
pip install virtualenv;
# 2. Creating empty virtual environment
mkdir venv && virtualenv venv;
# 3. Activating virtual environment
source ./venv/Scripts/activate;
# 4. Managing the requirements
pip install -r mac_gnu_requirements.txt;
garden install graph
For both the kind of system it's necessary to run the following command in order to run the GUI program.
python GUI/main.py
NB: Color legend is reported in the status bar at the bottom of the interface.
- Acceleration
- Red: Acceleration along x_axis.
- Green: Acceleration along the y_axis.
- Blue: Acceleration along the z_axis.
- Temperature: Yellow
NB: If y_label on graphs is upside-down change value (y.angle) in line 428 in Graphs' init.
Command | Description | |
---|---|---|
1 | Ports | Selects the COM port to which the device is connected. |
2 | Conn./Disconnect | Toggles the PSoC-GUI communication. |
3 | Start/Stop Device | Toggles data acquisition (N.B if Stop Device is pressed, the previous acquisitions are still maintained). |
4 | Print Data | Returns the stored data in graphical format and automatically saves the session into a [%H-%M-%S]data.csv. Data are stored in directories named as %F/. Once done device is turned off and EXT_EEPROM is reset. |
5 | Change Settings | Allows to select different configurations according to user request, afterwards resets EXT_EEPROM to avoid data inconsistencies. |
6 | FSR | Full scale range that goes from ±2g to ±16g. |
7 | ODR | Output data rate that can be selected as 1Hz, 10Hz, 25Hz, 50Hz. |
8 | Temp. Format | Selects the temperature measurement unit. |
9 | EEPROM_Saving | Enables/disables EXT_EEPROM data saving. |
- On-Board Button: if pressed for more than 1s toggles device state between Start/Stop (same as GUI), if pressed for more than 5s reset the EXT_EEPROM and then restore the last configuration.
- On-Board LED: it's toggled among four states.
- Period 1s, DC 0%: device is in a Stop condition (OFF / IDLE).
- Period 1s, DC 50%: device is working and saving data in EXT_EEPROM.
- Period 0.25s, DC 50%: device is no longer sampling because EXT_EEPROM is full.
- Period 1s, DC 100%: EXT_EEPROM is resetting (the pulse duration depends on the n° of pages been written).
- External LED: switches on when EXT_EEPROM is being read and data are sent through UART.
It's also available a beta version that includes the partial reading of the FIFO registers when a print event occurs before Watermark. To test this version it's possible to remove the // BETA VERSION comments in main branch or, without further efforts, by compiling the code in the last commit of the branch "Partial_reading".