| Both sides previous revision Previous revision Next revision | Previous revision |
| report:dvp [2026/06/14 13:54] – [Tests & Results] team2 | report:dvp [2026/06/14 22:14] (current) – [Smart System] team2 |
|---|
| The tablet application manages all user interactions, including session booking, environment configuration, and session control. Once the user selects a session and its parameters, the application sends commands to the embedded system. | The tablet application manages all user interactions, including session booking, environment configuration, and session control. Once the user selects a session and its parameters, the application sends commands to the embedded system. |
| |
| The ESP32 receives these commands and applies them to the physical lightning component. During the session, the system maintains the selected environment and ensures that the session duration is respected through a timer mechanism. | The ESP32 receives these commands and applies them to the physical lighting component. During the session, the system maintains the selected environment and ensures that the session duration is respected through a timer mechanism. |
| |
| This architecture ensures a clear separation between user interaction and hardware control, making the system easier to develop, test, and extend. | This architecture ensures a clear separation between user interaction and hardware control, making the system easier to develop, test, and extend. |
| <WRAP centeralign> | <WRAP centeralign> |
| <figure fig:LEDflow> | <figure fig:LEDflow> |
| {{ :report:led_flow.drawio.png?300 |}} | {{ :report:led_flow.drawio.png?500 |}} |
| <caption>Flow diagram of controlling LED</caption> | <caption>Flow diagram of controlling LED</caption> |
| </figure> | </figure> |
| The client receives commands from the server in a simple string-based message format, for example: message = "RGB:255,0,0\n". In this case, the LED will only emit red light, as the red value is set to 255 while the green and blue values are set to 0. The client code reads the incoming message by checking if it starts with the "RGB:" prefix. It then extracts the red, green, and blue values from the string and converts them into integers, which are used to control the LED output. The code developed in the Arduino IDE is included in the Deliverables section. | The client receives commands from the server in a simple string-based message format, for example: message = "RGB:255,0,0\n". In this case, the LED will only emit red light, as the red value is set to 255 while the green and blue values are set to 0. The client code reads the incoming message by checking if it starts with the "RGB:" prefix. It then extracts the red, green, and blue values from the string and converts them into integers, which are used to control the LED output. The code developed in the Arduino IDE is included in the Deliverables section. |
| |
| **Software Implementation and Code Flowcharts** | === Software Implementation and Code Flowcharts === |
| |
| The Bloem application was developed as a native Android tablet app. The app is responsible for the main user interaction, including booking a session, browsing available environments, starting or ending a session, and controlling the capsule atmosphere. This solution was chosen instead of a website because it provides a more stable experience on the tablet and allows easier integration with local functions such as sound playback and hardware communication. | The Bloem application was developed as a native Android tablet app. The app is responsible for the main user interaction, including booking a session, browsing available environments, starting or ending a session, and controlling the capsule atmosphere. This solution was chosen instead of a website because it provides a more stable experience on the tablet and allows easier integration with local functions such as sound playback and hardware communication. |
| The prototype software is divided into two main parts. The Android app manages the interface, session logic, timer, and audio playback through a Bluetooth speaker. The ESP32 is responsible for controlling the LED lighting system. Communication between the app and the ESP32 is done through Wi-Fi using TCP commands. | The prototype software is divided into two main parts. The Android app manages the interface, session logic, timer, and audio playback through a Bluetooth speaker. The ESP32 is responsible for controlling the LED lighting system. Communication between the app and the ESP32 is done through Wi-Fi using TCP commands. |
| |
| {{:report:session_booking.png?600|}} | <WRAP centeralign> |
| | <figure fig:session_booking> |
| | {{ :report:session_booking.png?600 |}} |
| | <caption>Flow of booking a session</caption> |
| | </figure> |
| | </WRAP> |
| |
| The above flowchart shows the session booking process. The user opens the app, selects “Book a Session”, chooses the session duration and time slot, and confirms the booking if the selected slot is available. If the slot is unavailable, the app displays an error message and allows the user to choose again. | |
| |
| {{:report:sessioncontrol.png?600|}} | In the above Figure {{ref>fig:session_booking}} the flowchart shows the session booking process. The user opens the app, selects “Book a Session”, chooses the session duration and time slot, and confirms the booking if the selected slot is available. If the slot is unavailable, the app displays an error message and allows the user to choose again. |
| |
| The above flowchart shows the session control and environment flow. When an active booking exists, the user can choose an environment preset, such as Calm, Ocean, Rain, or Energetic. The app then manages the session timer, plays the selected sound through the Bluetooth speaker, and sends lighting commands to the ESP32. | <WRAP centeralign> |
| | <figure fig:session_controle> |
| | {{ :report:sessioncontrol.png?600 |}} |
| | <caption>Session control and environment flow</caption> |
| | </figure> |
| | </WRAP> |
| |
| {{:report:ledcontrol.png?600|}} | In the above Figure {{ref>fig:session_controle}} the flowchart shows the session control and environment flow. When an active booking exists, the user can choose an environment preset, such as Calm, Ocean, Rain, or Energetic. The app then manages the session timer, plays the selected sound through the Bluetooth speaker, and sends lighting commands to the ESP32. |
| | |
| | <WRAP centeralign> |
| | <figure fig:LED_controle> |
| | {{ :report:ledcontrol.png?600 |}} |
| | <caption>TCP communication used for LED control</caption> |
| | </figure> |
| | </WRAP> |
| |
| The above flowchart shows the TCP communication used for LED control. When the user selects a color, the app converts it into RGB values, creates a command string, connects to the ESP32, sends the command, and waits for an acknowledgement response. If the response is valid, the app updates the interface as successful; otherwise, it displays an error. | In the above Figure {{ref>fig:LED_controle}} the flowchart shows the TCP communication used for LED control. When the user selects a color, the app converts it into RGB values, creates a command string, connects to the ESP32, sends the command, and waits for an acknowledgement response. If the response is valid, the app updates the interface as successful; otherwise, it displays an error. |
| |
| Overall, the flowcharts explain how the app separates the user experience from the hardware control. The tablet application handles interaction and audio, while the ESP32 manages the physical lighting system inside the capsule. | Overall, the flowcharts explain how the app separates the user experience from the hardware control. The tablet application handles interaction and audio, while the ESP32 manages the physical lighting system inside the capsule. |
| | |
| ==== Summary ==== | ==== Summary ==== |
| //Provide here the conclusions of this chapter and make the bridge to the next chapter.// | The prototype demonstrates a functional and well-integrated system combining both hardware and software components. The structural design reflects the intended capsule form, while the LED lighting system, controlled through a client–server architecture, operates as expected. The Android application provides an intuitive user interface, enabling session booking, environment selection, and real-time control of lighting and sound. |
| | |
| | Although some elements of the design were simplified or not implemented due to limitations in time, budget, and materials, the prototype still successfully validates the core concept and key functionalities of the system. Both hardware and software testing indicate that the implemented features perform consistently and meet the defined requirements. |
| | |
| | This leads to the final discussion of the project, where the achievements, limitations, and future development will be presented. |