A web server powered by an Arduino UNO and Raspberry Pi, interfaced with DHT22, DS18B20, and SEN0169 (Pro SKU) sensors, to monitor and graph aquaponics data in real-time. The data is stored and visualized over time and is accessible via a web browser.
- Software: VSCode
- Languages:
- Back-end: Python, Django
- Front-end: HTML, CSS, JavaScript, Bootstrap, AJAX
- Database:
- Firebase (real-time DB)
- SQLite3 (local DB)
- Framework: Django (open-source web development framework for Python)
django-admin startproject project_name
python manage.py startapp app_name
python manage.py runserver
CTRL + C
python manage.py test
python manage.py createsuperuser
python manage.py makemigrations app_name
python manage.py migrate
< PROJECT ROOT >
│
├── core/
│ ├── static/ # CSS, JS, images
│ ├── templates/
│ │ ├── includes/ # Components like navigation, sidebar, footer, scripts
│ │ ├── layouts/ # Base layout templates
│ │ ├── accounts/ # Login, Register pages
│ │ ├── index.html # Main landing page
│ │ ├── page-404.html # 404 Error page
│ │ ├── page-500.html # 500 Error page
│
├── authentication/ # Authentication logic
├── app/ # App logic and routing
├── requirements.txt # Dependencies
├── .env # Environment variables
├── manage.py # Entry point for Django project
- Create a Firebase account
- Create a new project
- Add Firebase configuration to your Django project (can be in
<script>
,views.py
, or JSON file):
const firebaseConfig = {
apiKey: "******************",
authDomain: "*********************",
databaseURL: "***********************",
projectId: "***********",
storageBucket: "**************",
messagingSenderId: "***********",
appId: "******",
measurementId: "********"
};
- Live plotting using Python with data from Arduino (connected sensors)
- Real-time charting using Firebase data
- Data display through Django + AJAX interface
- AJAX = Asynchronous JavaScript and XML
asgiref==3.2.3
certifi==2019.11.28
chardet==3.0.4
dj-database-url==0.5.0
Django==3.0.1
django-heroku==0.3.1
gunicorn==20.0.4
heroku==0.1.4
idna==2.8
psycopg2==2.8.4
python-dateutil==1.5
pytz==2019.3
requests==2.22.0
sqlparse==0.3.0
urllib3==1.25.7
whitenoise==5.0.1
This system integrates Arduino UNO, Raspberry Pi, and the DHT22, DS18B20, and SEN0169 sensors, using a Python virtual environment and SQLite to store and display real-time aquaponics data via a Django web server.
- Django + AJAX is used to serve the frontend and backend
- Firebase is used for real-time data handling
- Plotly is used for charting
- Interface for viewing stored sensor data curves from the Django DB.
- Select a date from the calendar to view graphs for that day.
- Real-time sensor data plotted from Firebase DB (temperature, humidity, water temperature, pH)
- Admin interface to configure threshold values for temperature and other sensor limits.