๐ฑ Chilibot RaspberryPi Documentation ๐ค
Overview
This documentation provides a detailed overview of the Chilibot project's code structure and functionality. The project comprises several Python modules, each handling specific tasks in the automated gardening system.
๐๏ธ File Structure
-
grow_light_scheduler.py ๐
- Manages the scheduling for the grow light.
- Contains functions to turn the light on and off based on predefined schedules.
-
pump_valve_scheduler.py ๐ง
- Handles the scheduling for the water pump and solenoid valve.
- Includes functions to activate or deactivate the water systems at specific times.
-
sensor_scheduler.py ๐ก๏ธ
- Responsible for collecting and processing data from various sensors.
- Schedules periodic sensor readings and data logging.
-
can_commands.py ๐
- Contains definitions and functions for CAN bus communication.
- Facilitates sending and receiving CAN messages to/from various components.
-
dashboard.py ๐
- Implements the main user interface for the system, this is the home page of the user interface.
- Displays real-time data, logs, and controls for the system.
-
db.py ๐
- Manages database interactions.
- Stores, retrieves, and manages data like sensor readings and system states.
-
start.py ๐
- Main entry point for the application.
- Initializes and starts all services, schedulers, and the dashboard.
๐ Getting Started
To get the system up and running:
- activate the environment by running
source env/bin/activate
- Ensure all dependencies are installed.
- Run
start.py
to initialize and start all components of the Chilibot system. - Access the dashboard located at http://192.168.2.5:8501/` to monitor and control the system.
๐ ๏ธ Customization and Expansion
- Modify the scheduler files (
grow_light_scheduler.py
,pump_valve_scheduler.py
,sensor_scheduler.py
) to change the timing and logic of operations. - Update
can_commands.py
for changes in CAN communication protocols or message formats. - Enhance
dashboard.py
to add more features to the user interface. - Adjust
db.py
for any changes in data storage requirements or database schema.