Menu
Onboard Gateway web-server GUI

GUI for the Onboard Gateway | Hackaday Dream Team 2020

This project contains a GUI for the Onboard Gateway PCB design. The microcontroller used in the PCB is the ESP32.

Requirements

  1. ESP32 Add-on in Arduino IDE
  2. ESPAsyncWebServer
  3. AsyncTCP
  4. SPIFFS File System
  5. ESP32 Async Over The Air
  6. LoRa

The ESP32 creates an Asynchronous Web Server, with the following credentials:


                  const char* ssid     = "EJA_Onboard_Gateway";
                  const char* password = "123456789";
                

With those credentials it is possible to access the WiFi network.

Phone Wi-Fi network list showing the EJA_Onboard_Gateway access point created by the ESP32

Wifi network.

The ESP32 creates a Domain Name System (DNS) to assign a domain name to the web server. That means that it is not necessary to know the server IP, it is possible to access the web server using the defined domain name for the host, in this case, the name is:


                  const char* host = "www.onboard_gateway.eja";
                

Once the device (phone/computer) is connected to the server (EJA_Onboard_Gateway), open a browser and visit the following url:


                  http://www.onboard_gateway.eja/
                

Home

The previous link displays the web page used for HOME:

Onboard Gateway web interface: Home page

Home Screen.

There is a header with the name "EJA Onboard Gateway" that opens a sidebar with links to the different test functionalities. It is also possible to access those pages using the buttons in HOME.

Onboard Gateway web interface: sidebar menu listing the test pages

Side Menu.

GPS

The page http://www.onboard_gateway.eja/gps shows the data from the GPS module.

Onboard Gateway web interface: GPS page showing data from the GPS module

GPS Screen.

Timer

The page http://www.onboard_gateway.eja/timer shows the interface to create a timer in the Buoy. The timer represents a countdown that activates the release mechanism when the time has reached zero. The initial page allows the user to set the timer.

Onboard Gateway web interface: Timer page with a countdown duration entered

Timer Screen.

After selecting the amount of time the user has to click the Submit button. That will send the information to the buoy to create a timer.

Onboard Gateway web interface: Timer page waiting while the setting is sent to the Buoy

Updating the timer.

The Onboard Gateway communicates with the Buoy, and once it receives the confirmation that the timer has been properly set, it displays the countdown to the user.

Onboard Gateway web interface: Timer page showing the estimated countdown

Remaining time.

In the Onboard Gateway, the countdown timer is an estimate of the one that is running in the Buoy. When the timer reaches zero, the Buoy activates the release mechanism.

Onboard Gateway web interface: Timer page showing the countdown at zero

Screen when the timer reaches zero.

The user can delete the timer at any time clicking the button Delete Timer. But it will only work if the Onboard Gateway has communication with the Buoy. When the user deletes the timer, it is possible to create a new one and restart the process.

Onboard Gateway web interface: Timer page with the Delete Timer button

Screen after the timer is deleted.

LoRa

The page http://www.onboard_gateway.eja/lora shows internal messages related to LoRa. In the ESP32 that information is stored in the variable:


                  String lora_all_msg = "";
                
Onboard Gateway web interface: LoRa page showing internal LoRa messages

LoRa Screen.

Terminal

The page http://www.onboard_gateway.eja/terminal shows internal messages. In the ESP32 that information is stored in the variable:


                  String terminal_messages = "";
                
Onboard Gateway web interface: Terminal page showing internal messages

Terminal Screen.

LED Test

There is an additional page http://www.onboard_gateway.eja/toggle_led_on that can be use to change the state of a LED, the GPIO port used is define in the following variable of the script:


                  #define LED_TOGGLE LED4         // Led use for togle example (toggle from web page)
                

The buttons in the page (ON and OFF) can be used to change the state of the LED.

Onboard Gateway web interface: LED Test page with the LED switched on

Screen used to turn ON/OFF the Led, state ON.

Onboard Gateway web interface: LED Test page with the LED switched off

Screen used to turn ON/OFF the Led, state OFF.

Future Improvements

For more information about the recommended future improvements for the electronic design visit the following post.

Posted In:
Embedded Software