Sprint 3
The third sprint was held from 27th October to 10th December.
User Stories
The user stories related to this sprint are the following ones:
- US3. Sensor data must be must be sent to a Supervision Station.
- US5. Maintenance manager requires graphically representation of the obtained sensor data, within the last 24h, in the Supervision Station.
Functional requirements:
- A WiFi module for connecting to the MQTT broker and subscribe to the data. It has been spent 15h
- A middleware module for connecting the WiFi module to RT module. It has been spent 15h
- A RT module for catching the data from the middleware and displaying it by a LCD Screen. It has been spent 8h
Globally, it has been spent 38h.
Tasks and Assigments
The tasks and assignments for this sprint, which are related to the user stories previously mentioned, are the following:
The total amount of points for this sprint was 28. The management of the tasks and issues mentioned is held here.
Progression of Supervision Station
The work of the Supervision has been splitted into 3 parts:
- ESP-01 Subscriber
- RPi + Arduino
- RPi + LCD Screen
The video demonstration of the project can be found in the presentation slides.
ESP-01 Subscriber
The workpath of the ESP-01 subscriber for this sprint is the following:
- Try to flash ESP8266 firmware with AT Commands to ESP-01
- Implement our own protocol
- Develop subscriber logic.
- Test Subscriber Logic
- Develop arduino communication using serials.
- Test connection with arduino.
In order to communicate with the Arduino, it has been created a protocol:
- ESP-01 actualizes the data every time a message is sent to the broker.
- Communication starts on Arduino:
- Arduino Sending: “0” - ESP-01 Returns: “test”
- Arduino Sending: “1” - ESP-01 Returns: { “temperature”: 23.00 , “humidity”:43.00, “hic”:25.00 }
- Arduino Sending: “2” - ESP-01 Returns: { “X” : 0.12, “Y” : 3.56, “Z” : 13.32};”
- Arduino Sending: “j” - ESP-01 Returns: Full json for debugging purposes.
- Arduino parses json using ArduinoJson and sends info to Reporting center
RPi + Arduino
The communication between RPi and Arduino is done by I2C.
The workpath was the following:
- Attempting to send and receive a character.
- Attempting to send and receive multiple characters (string).
- Attempting to send and receive a struct.
- Turning the data received from ESP01 to the desired struct.
Troubleshoot
In order to control the I2C bus, ChibiOS resets the configuration when a Q_RESET or Q_TIMEOUT flag is received. In addition, the arduino must have the slave address of 0x04, otherwise, it will not work.
RPi + ChibiOS
The workpath for this sprint is the following:
- Print characters to the screen
- Draw lines to the screen
- Play with the position of the lines
- Code structure for plots.
- Draw a plot.
- Turn the data from the structs received from the arduino to the structs needed for drawing.
In order to implement the lines functions, it has been reviewed the Sparkfun BackPack LCD Screen. The development is built with structures for displaying the information.
Troubleshoot
There was a problem with displaying the float properly.
- It has been modified the chprintf.c in order to display correctly the floats.
- It has been modified the float precision to 2 decimals.
Miscelaneous
The slides for the Sprint 3 can be found here