- Main Landing Page ❤️✨: Readme.md
- RPI Board ⚡: RPI Documentation
The main files are located in 'app/utils' and included the main.py
The Environmental Monitoring System described here integrates various sensors to monitor environmental parameters and log data to a CSV file. Additionally, it utilizes indicator lights for real-time visualization of sensor readings.
The system includes sensors for measuring acceleration, gyroscope data, magnetometer data, temperature, gas, humidity, pressure, proximity, color, and GPS data. It records sensor data at a specified hertz rate, and updates indicator lights based on the sensor readings. The computing power is best kept in a range of 1-90 hertzs.
The following components are utilized in the system:
-
Sensors:
- LSM9DS1: Accelerometer, gyroscope, and magnetometer.
- APDS-9960: Proximity and color sensor.
- BME680: Temperature, gas, humidity, and pressure sensor.
- GPS module: For GPS data.
-
Indicator Lights: NeoTrellis buttons with RGB LEDs are used to visualize sensor readings in real-time, and as an actuator for stemming.
-
Other Components:
- Flip switch: Input device to trigger certain actions.
- CSV file: Data is logged to a CSV file for further analysis.
-
Initialization:
- The system initializes the I2C connection and sets up the various sensors and components.
-
Sensor Data Reading:
- Sensor data is continuously read from the LSM9DS1, APDS-9960, BME680, and GPS module.
-
Indicator Light Control:
- The system calculates color values for each sensor reading based on predefined thresholds.
- Indicator lights are updated to reflect the current sensor readings in real-time.
- Each sensor has its unique thresholds, ensuring that the color representation is optimized for its specific range.
- The color representation is bounded in a range to represent the transgender pride flag.
-
Data Logging:
- Sensor data along with GPS data and indicator state is logged to a CSV file at the hertz rate provided.
- The CSV file contains timestamped sensor readings, GPS coordinates, and the state of the flip switch.
-
User Interaction:
- Users can interact with the system through the flip switch to trigger certain actions.
- NeoTrellis buttons allow users to interact with the device via stimming.
-
End of Operation:
- The system continues to record sensor data until the predefined duration is reached.
- Once the recording duration is complete, the CSV file containing logged data is sent to the AWS backend.
- The CSV file is then earsed to ensure ample space on the RPi. For example, it's common for csv files to reach over 20 megabites!
- Adafruit LSM9DS1: Accelerometer, Gyro, Magnetometer Info
- Adafruit TSL2591: Ultra-high-range luminosity sensor Info
- MAX4466: Microphone Info
- Install dependencies:
-
From the Root Directory (Command Spells):
-
Install packages
pip3 install -r requirements.txt -
Run main file!
python3 app/utils/main.py -
🌟 This activates the environment check subroutines.
-
- Sensors on the I2C bus are addressed using their unique I2C addresses. Ensure the device has I2C enabled!
- The
hertzparameter can influence how often the I2C bus is queried, which is crucial for sensors that require time to refresh their data. - The GPS and sensors take about 5-10 seconds to "initalize". That is, callibrate their own readings.
✨🧙♀️✨