Android Application Builder for ESP8266 and ESP32

Electronics and Programming tutorials and projects

Android Application Builder for ESP8266 and ESP32

wicard android app

This project is a web IOS and Android application builder for ESP8266 and ESP32 WiFi modules

The projects are available in the following links:

ESP32 WebApp Builder + Chain Network Feature (Arduino Source Code) – Rev 1.4

ESP8266 WebApp Builder + Chain Network Feature (Arduino Source Code) – Rev 1.4

You can use the web ios and android application builder for the following modules:

ESP32-Cam
ESP32 Devkit
NodeMCU
ESP8266Mod
ESP32 WROOM
ESP12
and etc.

These project also supports an local network.

There are the following files in this project:

– ESP32WebAppBuilder.html – The Web App builder file. You can open this file with a web browser like Firefox, google Chrome, edge etc.

– example folder – This folder contains a simple example program of the ESP WebApp and the chain network.

– ESPWebApp folder – This folder contains an “Arduino Base Source Code” which you can use for your ESP programs. This folder contains the following system files:

  1. ESPWebApp.ino (Main handler file)
  2. AC.h (Configuration header file)
  3. AC.ino (Configuration handler file)
  4. functions.ino (System functions)
  5. rootPage (UI handler file)

And the following blank user files for your WebApp:

  1. user_global.h – You can define your global variables and definitions in this file.
  2. user_init.ino – This file has a “userInit()” function which calls once at the startup.
  3. user_loop.ino – This file has a “userLoop()” function which calls repeatedly (like arduino “loop()” function).
  4. user_settings.ino – This file has a “userGetSettings()” and a “userSetSettings()” functions which can get or set the user settings in the WebApp’s settings menu.
  5. user_main.ino – This file has a “userMainInit()” function which calls once after you click on the WebApp’s main menu and “userMain()” which calls intervally as long as the WebApp main menu is open.
  6. user_sub.ino – This file has a “userSubInit()” function which calls once after you click on the WebApp’s sub menu and “userSub()” which calls intervally as long as the WebApp sub menu is open.
  7. user_global.ino – This file has a “userGlobal()” function which calls at the same time in all of the devices in the network. This function will be called when the app sends a command to the network (after userMain and userSub).
  8. Webapp.h – This file contains the WebApp’s source code and can be generated by the WebAppBuilder file.

The ESP WebApp Data

In the Arduino source code, there are 8 “unsigned int” variables (uiAppData[0]… uiAppData[8]) which are shared between the module, the WebApp and all of the modules in the chain network.

These variables may change after any transactions, so they are not suitable for storing the user program data.

When the main menu or sub menu opens in the web application for the first time, the WebApp asks for the uiAppData. The starter fills its own data into the uiAppData, then sends it to the next device, until the last device and then the response (uiAppData) will be sent to the WebApp.

The Web IOS and Android Application

The web application is placed in the root page address which is 192.168.4.1 by default and can be set to 192.168.5.1 or you can use the router’s DHCP IP. The WebApp is divided to 3 menus. The menus can be selected by click on the menu button.

esp8266 webapp

After selecting the menu, the WebApp asks for the initial WebApp Data (uiAppData) and then runs the WebApp script.

  • The “Main menu”, “Sub menu”, logo, link, titles and the colors can be customized in the WebApp builder.
  • Also you can add your customized settings to the Settings menu.

The ESP WebApp Settings menu

The web application’s settings menu has been divided to 5 parts:

  1. Modem Configuration
    In this section you can see the available access points, the connection status, the device MAC address and the DHCP IP.
    Also in this section you can set the SSID and password of the modem’s access point.
  2. Device Hotspot Configuration
    In this section you can set your module’s hotspot SSID and password.
    The secure link is a string which will be added at the end of your module’s IP address. For example if you set it “123”, the IP address of the WebApp of your module will be 192.168.4.1/123 instead 192.168.4.1
    The even means the default IP is 192.168.4.1, the Odd means the default IP is 192.168.5.1
    Hidden HotSpot will set the HotSpot hidden.
    Temporary HotSpot will disable the HotSpot right after the module is connected to the modem or joined to the network (For the last device in the network).
  3. User-Defined Settings
    You can define these settings in the WebApp Builder.
  4. Local Network Configuration
    In this section you can set the “Master” device and also set the userGlobal() function execution delay.
    The linked WiCard IP is the IP of linked device to the module’s access point.
    If you don’t turn on the “Join Required” switch, the module will be set as Master.
  5. Local Network Map
    In this section, the attached devices in the chain network will be shown.
    For the master, it starts with master’s SSID, then the second ESP device, until the last one, but for the last device, the sort is vice versa.

    If you are going to send the command to only just a specific device, type its SSID in the Target text box.
esp webapp network

ESP8266/ESP32 Android Application Builder

In the ESPWebAppBuilder.html, you can customize the WebApp’s template colors, the font colors, the logo, the page icon, the main menu and sub menu title, the page title, the menu external link title, the settings, main menu and sub menu elements and the main menu and sub menu script.

The ESP WebApp Builder can directly generate the webapp.h or generate the WebApp code.

You can run the ESP WebApp builder with a standard web browser (no need to the internet connection).

android application builder

By click on the “Note” icon, the manual and descriptions of each part will be appeared.

There are pre-defined functions in this project which you can refer to the manual file.

The projects are available in the following:

 

Leave a Reply

Your email address will not be published. Required fields are marked *

6 + 19 =