How kl3m4n/connected-flowers works
Project type and purpose
• This is an IoT-enabled, full-stack academic project (“Connected Flowers”) that integrates embedded firmware (on Arduino), edge computing (on a Raspberry Pi 3 B+), a MySQL relational database, and a C-based analytics/interaction client.
• The goal is to monitor plant parameters (e.g., soil moisture) with Arduino sensors, ship that data to a Raspberry Pi, store it in MySQL, and drive a C application that queries and processes the data.
File structure
Top-level:
• algorithmique/ – C code (algo_plante.c), database-API based analytics, plus design docs (Algo_Client.vsdx)
• merise/ – database model (MCD.mcd) and schema/load script (uf_dev.sql)
• arduino/ – firmware sketches and sensor-reading code (not shown in listing but implied by directory)
• raspberry/ – Python script (add_info_DB.py) that reads sensor data (e.g., via serial or network) and inserts into MySQL; subfolder photos
• README.md – high-level description, tech stack, setup instructions
README for additional insights
• Tech stack: C, MySQL API, Arduino, Raspberry Pi
• Workflow:
1) Arduino reads sensors
2) Raspberry Pi collects sensor data and calls MySQL
3) C binary queries the same MySQL DB to compute or display results
• The MySQL schema is created via uf_dev.sql based on the Merise MCD.
Main components & interactions
a) Components
• Arduino device (soil-moisture sensor + firmware)
• Raspberry Pi 3 B+ running add_info_DB.py
• MySQL Database (hosted on the Pi or a separate DB server)
• C client application (algo_plante.c) running on a host PC
• (Optionally) Merise/Data Modeling artifacts as reference, and any graphical UI layer if present
b) Relationships & data flows
1) Arduino → (serial or network) → Raspberry Pi
2) Raspberry Pi → (MySQL API) → MySQL Database
3) C client → (MySQL API) → MySQL Database
c) Architectural patterns / design principles
– Clear separation of concerns:
• Embedded sensing layer (Arduino)
• Edge ingestion & storage layer (Raspberry Pi + MySQL)
• Analytics / UI layer (C client)
– Standard client–server DB pattern for data persistence
d) Key technologies & libraries
– Arduino C/C++ sensor code
– Python + MySQL Connector on Raspberry Pi
– MySQL 5.x or 8.x
– C application built with mysql_config for DB connectivity
– Merise modeling (MCD, SQL schema)
Detailed architectural capture
• Inside: “add_info_DB.py (Python)”, “MySQL Server”
• “algo_plante.c → app (C-MySQL Client)”
• Blue for devices, green for data store, orange for applications