Espressif Logo

Get Started: Application Development on Espressif ESP32-WROVER-KIT V4.1

Develop multi-languages (C, Java, etc.) applications on Espressif ESP32-WROVER-KIT V4.1 development board with MicroEJ Software Development Kit.

Follow the steps below to get your first app running on both a virtual device, and a real device (final hardware). In case you are not familiar with MicroEJ, please visit Discover MicroEJ to understand the principles of our technology.

1 – Download MICROEJ SDK

MICROEJ SDK is an IDE built on Eclipse for creating feature-rich applications for MicroEJ Virtual Execution Environment (VEE).


Supported Operating System

MICROEJ SDK runs on all popular desktops operating systems: Windows (7, 8, 8.1, 10), Linux, macOS.

A Java™ Runtime Environment 8 is needed on your host computer for running MICROEJ SDK. Download Java™ Runtime Environments


Download MICROEJ SDK

Click the below button to download the installer package corresponding to your host computer OS (about MICROEJ SDK download).

DOWNLOAD MICROEJ SDK

2 – Install MICROEJ SDK

  • Unzip the downloaded installer package, if needed.
  • Run the unzipped executable file.
  • On Windows, accept the administrator privileges elevation.
  • Follow the installer steps.
  • Once MicroEJ SDK has been installed, you must check for any updates, and eventually install them.
    • Start MicroEJ SDK
    • In the main window horizontal menu, select Help, then Check for Updates

    Check for updates

    • Follow the update steps.

3 – Download And Use the ESP32WROVER Virtual Device, based on the Black VEE Sample

MicroEJ provides various VEE samples, all called out of different colors, to distinguish the various APIs these VEE provided to the applications.

  • Start MICROEJ SDK.
  • Select the workspace where to store your applications. If you are not familiar with Eclipse workspaces, select the default workspace and press Launch.
  • Select the MicroEJ repository where to store the various Virtual Devices. If you are not familiar with MicroEJ repositories, select the default and press OK.
  • Select the Window > Preferences > MicroEJ > Virtual Device menu.
  • Download the ESP32WROVER Virtual Device (See release notes)
  • Press the Import... button and select the ESP32WROVER Virtual Device file previously downloaded (all virtual devices have the .vde extension).
  • Accept the license terms and press Finish. The ESP32WROVER Virtual Device is successfully installed.
  • Get a set of sample applications. Download the application samples
  • Select File > Import... > General > Existing Projects into Workspace > Select archive file and select the downloaded archive.
  • Import everything into your workspace.
  • Open the Project Explorer View Window > Show View > Project Explorer. Your first applications are loaded, and ready to run:
    • Hello World APP: com.microej.demo.hello
    • Hello Bluetooth APP: com.microej.example.bluetooth.hello
    • Hello REST APP:com.microej.example.iot.ssl.rest.headless

Demo APP for Espressif ESP32WROVER VD

4 – Dynamically Download and Run Applications Examples on the ESP32WROVER Virtual Device

Download and Run the Hello World Example on the ESP32WROVER Virtual Device

  • Right-click the MicroEJ project com.microej.demo.hello.

Run an embedded application on MicroEJ SDK

  • Then Run As > MicroEJ Application.
  • If asked, select the ESP32WROVER Virtual Device: VDE-BLACK-ESP32WROVER-RQQAW.
  • The ESP32WROVER Virtual Device runs and displays a simple UI on its display.

 

Developement on Espressif ESP32 WROVER KIT UI Example


5 – Dynamically Download and Run Applications Examples on the ESP32WROVER Real Device, based on the Black VEE sample

Hardware Configuration

  • All tests of this getting started have been done on the ESP32 WROVER kit v4.1 (please contact MicroEJ support for other ESP32 demo boards).

Software Development on ESP32 WROVER ESPRESSIF

  • Remove the resistor R167: it allows the display to work in conjunction with the SD Card support (the R167 resistor removal permanently fixes the SD Card malfunction detect function).

Software Development on ESP32 ESPRESSIF Board

  • Plug the microSD card in the ESP32-WROVER-KIT development board.
  • Standard output traces can be read through a UART link when connecting the JP5 USB connector to your computer. Configuration of the UART is: 115200 bps, 8N1, no handshake

On Boarding BLACK VEE on the ESP32WROVER real device: flashing the firmware

The BLACK VEE embeds a dynamic APP loader. Once flashed, the ESP32WROVER is capable of dynamically load (link and run) the APP. You won’t need to reboot the device.

  • Plug the board (J5 connector) with a USB cable to the PC, make sure that the JP7 jumper is set to USB_5V.
  • The esptool python script from the ESP-IDF is needed.
  • You can download the ESP-IDF 3.1.1 from GitHub. Unzip it in a directory of your choice.
  • From the root folder of the ESP-IDF: the tool is located in /components/esptool_py/esptool/esptool.py
  • You may need to install Python and its dependencies using pip for the tool to work: (execute in a DOS console) python -m pip install pyserial
  • Grab the BLACK VEE for the ESP32-WROVER board here: Download all the .bin files (See release notes) and place them into a dedicated binaries directory.
  • Next the command to execute to flash the ESP32-WROVER. The command assumes it is executed from thee binaries folder
    • replace ESPTOOLSXXX by the directory where you have installed the Espressif toolchain
    • replace COMXXX by the COM port of your board (the ESP32 Wrover Kit v4.1 mounts 2 COM ports and both should be tested, check here for more information.)
python.exe ESPTOOLSXXX/components/esptool_py/esptool/esptool.py --chip esp32 --port COMXXX --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader_1.1.1.bin 0x8000 partitions_microej_multiapp_1.1.1.bin 0x10000 BLACK-ESP32WROVER-RQQAW-1.1.1.bin
  • Start the ESP32-WROVER with the MicroEJ BLACK VEE. It will create a file template for WiFi configuration on the microSD card (if no such file exits).
  • Power off the ESP32-WROVER board and unplug the microSD card.
  • Connect the microSD card to a computer.
  • Edit the file /usr/storage/features/EspressifLauncher/wifi.properties.list, and fill out your WiFi Access Point information (no need to add  security settings).
    Wifi config
    Make sure to remove the # at the beginning of the two lines.
  • Put back the microSD card in the ESP32-WROVER board and power it.
  • The ESP32-WROVER board will connect to your specified WiFi Access Point, the screen will display the IP of the ESP32-WROVER when connected. Logs are accessible through a UART link (see hardware configuration above for parameters values). Note that in case of bad wifi signal, the BLACK VEE will endlessly tries to connect until it manages to connect.Wifi connection

Dynamically Download and Run the Hello World Example

They are many ways to download an APP to a Powered by MicroEJ device: from an APP Store, push/pull mode, etc. For this first application, we shall use a simple one step process:
MICROEJ SDK uses the concept of Runners to launch the executions of commands (all Runners are accessible using the Windows > Show views > Others...General > Runners or simply by clicking the icon. We shall create a Runner to initiate the download. You should have already launched the com.microej.demo.hello application once, if not, do it now, we will reuse the Runner already created.

  • Go to Run > Run Configurations..., select com.microej.demo.hello HelloEntryPoint and duplicate it thanks to the toolbar.

  • It should result in a Runner named com.microej.demo.hello HelloEntryPoint (1).
  • Select it and rename it Deploy com.microej.demo.hello HelloEntryPoint.
  • Change the Execution to Execute on Device and the Settings to Local Deployment to Local Deployment (Socket)

  • Select the Configurationtab to provide the runner with the board IP (the one displayed on the screen).

  • Click on Run button: the APP is being incrementally OTA downloaded to the device.
  • When an APP is downloaded for the first time, the BLACK VEE provides an auto-start of the APP: the Hello APP starts and displays its messages.
  • The BLACK VEE provides a remote APP management service through a web application accessible on the board port 4001. It is a build-in APP provided by BLACK VEE: Forge Connect. Open a web browser and provide the IP_OF_THE_BOARD:4001. You can start and stop the Hello application. The application is installed on the filesystem, so on reboot, you can start it again using the Forge Connect APP (on-board remote service).

Play with forge connect

  • BLACK VEE is fairly complete with a full set of included APIs: UI/UX, File System, Network, Security, OSGi-like components framework, and much more …

Black VEE API


(Optional) Packaging a WPK file, Dynamically Download and Run the Hello World Example

This is an optional step and another way to deploy an APP to a real device. WPK files are packages containing all the resources of your application, to obtain a WPK and

  • Select the com.microej.demo.hello project and right click to select Build Module.

Build an APP

  • The APP is being build, and saved into you project C:\Users\YOUR_USER_NAME\.microej\workspaces\MicroEJ-SDK-19.05\com.microej.demo.hello\target~\artifacts\hello.wpk
  • With the com.microej.demo.hello project being selected, right click to select Run As > Run Configuration....

Run configuration

  • Select MicroEJ Tools, then right click New. This creates a new Runner. Give it a name, such as Download Hello APP, then select the communication means with the board: WPK Local deployment over Socket.

Run configuration

  • Select the Configurationtab to provide the runner with the board IP (the one displayed on the screen), and the hello.wpk file using the browse button.Run configuration
  • Click on Run button: the APP is being incrementally OTA downloaded to the device.
  • Same as before when an APP is downloaded for the first time, the BLACK VEE provides an auto-start of the APP: the Hello APP starts and displays its messages.

GOING FURTHER

Test specifically-tailored IoT examples

Extend your application with communication, in this suite of examples that explores the following subjects:

  • Connectivity detection.
  • JSON processing.
  • REST server setup.
  • REST client use.
  • Interaction with a MQTT server.
  • SSL security.
  • WebSocket client use.
SEE MORE
NEXT STEP

Build a VEE For Your Device

Learn how to create and extend your MICROEJ VEE  in order to start prototyping your embedded device. You may also access more resources and examples on Embedded GUI and IoT Connectivity on the dedicated pages.

Build Your VEE

MicroEJ Developer Forum

Need Help?

Developer forum

Tips and tricks, insights and discussions…
MicroEJ community helps you solve your challenges!

Go To Forum