Computational Nodes:
• Local gateway :
Working as an http client to send requests to the web server. Every time a smart card is read send a request to the server and get as response if the study session should begin or not. If a study session should start then take also from the response the data for the study session and use those inside the local gateway logic. when a study session has started continuously check for the sensor data to see if the student left its place or not. From the sensors it takes the echo signal as an input and measuring the duration of this signal, to convert it later into the distance with respect to the object.
• Web server :
1) Taking both requests from the browser and also the http requests from the raspberry. Running the logic to manage those requests and also send the apropriat queries to the database.
Sensor/actuator used:
For every place there will be an ultrasonic sensor measuring the distance, and also LEDs as actuator to light up if the place is free or not. Also the smart card reader acts as a sensor, reading the students fiscal code.
User interface:
The user interface is the web interface. The user can make changes for his booking only online.
–distance sensor in the desk
- LED for each desk:
- i2c port expander to tackle the scalability issues due to GPIO pin limitations
–Card reader at the entrance of the study room:
–Local gateway (raspberry PI) as a computational node :
–A computer to hold the web server and the database :
Sensor data interpretation software (on local gateway)
–Recieve an echo signal from the sensor as an input at one of the GPIOs, measure it's duration and convert it into a distance. –Software to recognize the presence of a smart card in the reader and extract from the smart card the ID
Software for managing the active study session (on local gateway)
–Process the response from the web server and the data coming from the smart card reader and tries to manage the study session(understand when to end the study session, if student left the place)
Web application (on central server)
–Flask framework, respond to both browser requests and local gateway http requests. –Try to send the apropriate queries to the database server
Database server
–Execute the queries coming from the web server and provide the appropriate data.
REST architecture
–This is how the communication between the web server and the local gateway is done. The local gateway acts as a http client while the web server as a http server
•distance sensor
•LED
•Raspberry Pi
•PC
•breadboard
•i2c port expander
•resistors
•Smart card reader
Electronic circuit to connect the sensor and led with the GPIO ports. This circuits trie to limit the current drawn for the GPIO ports
Html programming, CSS, javascript (Building the interactive webpage)
Python (for both the web app and the local gateway program)
mysql (building the object oriented database)
Continuation of the open issues in D2
The system lacks of the participation of internet, the online database and online web can not be implemented so far