Espressif Logo

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

Develop Java/C 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 virtual device and final hardware. In case you are not familiar with MicroEJ, please visit Discover MicroEJ to understand the principles of our technology.

1 – Install MICROEJ SDK

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


Supported Operating System

MICROEJ SDK runs on the following operating systems: Windows (7–8-8.1-10), Linux, Mac OS X)

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


Download MICROEJ SDK

Download the installer package corresponding to your host computer OS.


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.
  • Proceed to the next step.

2 – Download And Use Your Virtual Device

  • Start MICROEJ SDK.
  • Select the workspace where to put your applications. If you are not familiar with Eclipse workspaces, select the default one and press Launch.
  • Select the repository where to put your Virtual Device. If you are not familiar with MicroEJ repositories, select the default one and press OK.
  • Select the Window > Preferences > MicroEJ > Virtual Device menu.
  • Download the Virtual Device
  • Press the Import... button and select the Virtual Device file previously downloaded (all virtual devices have the .vde extension).
  • Accept the license terms and press Finish. The MicroEJ Virtual Device is successfully installed.
  • Download your first application examples
  • Inside MICROEJ SDK.
  • Select File > Import... > General > Existing Projects into Workspace > Select archive file and select the downloaded archive.
  • Import everything to your workspace.
  • Your first applications are loaded, ready to execute:
    • com.microej.example.bluetooth.hello.
    • com.microej.demo.hello.
    • com.microej.example.iot.ssl.rest.headless.

3 – Run the Examples on the Virtual Device

Running the UI Example

  • Right-click the MicroEJ project com.microej.demo.hello.
  • Then Run As > MicroEJ Application.
  • Select theVDE-BLACK-ESP32WROVER-RQQAW.
  • It should launch the simulation displaying the Front Panel (simulated device on PC).
  • The demo is displaying a simple UI on the Front Panel.

Developement on Espressif ESP32 WROVER KIT UI Example


Running the REST Client Example

  • Right-click the MicroEJ project com.microej.example.iot.ssl.rest.headless.
  • Then Run As > MicroEJ Application.
  • Select theVDE-BLACK-ESP32WROVER-RQQAW.
  • It should launch the simulation displaying the Front Panel (simulated device on PC).
  • In the Eclipse Console you should have a similar trace printed:
=============== [ Initialization Stage ] ===============

=============== [ Converting fonts ] ===============

=============== [ Converting images ] ===============

=============== [ Launching on Simulator ] ===============

https example INFO: {"headers":{"user-agent":"Resty/0.1 (Java)","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","x-forwarded-port":"443"},"args":{},"url":"https://postman-echo.com/get"}

https example INFO: user-agent: Resty/0.1 (Java)

host: postman-echo.com

https example INFO: =========== POST REQUEST ===========

https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","content-length":"20","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","content-type":"text/plain; charset=UTF-8","x-forwarded-port":"443"},"files":{},"json":null,"data":"My POST request data","args":{},"url":"https://postman-echo.com/post"}

https example INFO: Data sent for POST request: My POST request data

https example INFO: =========== PUT REQUEST ===========

AbstractPage.renderContent()

AbstractPage.renderContent()

https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","content-length":"19","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","content-type":"text/plain; charset=UTF-8","x-forwarded-port":"443"},"files":{},"json":null,"data":"My PUT request data","args":{},"url":"https://postman-echo.com/put"}

https example INFO: Data sent for PUT request: My PUT request data

https example INFO: =========== DELETE REQUEST ===========

https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","x-forwarded-port":"443"},"files":{},"json":null,"data":{},"args":{},"url":"https://postman-echo.com/delete"}
  • It confirms HTTPS communication between the Virtual Device and the postman-echo.com server.

4 – Run the Examples on Your Board

Hardware Configuration

  • All tests of this getting started have been done on the ESP32 WROVER kit v4.1.
  • Remove the resistor R167 to allow the display to work with the SD Card support. (The resistor removal will permanently remove the SD Card detect function.)
  • 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

Flashing the MicroEJ BLACK Firmware

  • 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 and you can 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 dependencies using pip for the tool to work: python -m pip install serial pyserial
    • Download all the .bin files
    • Here is the command to flash the ESP32-WROVER assuming you are executing it in the binaries folder (replace <COM_PORT> by the com port of your board, i.e. COM21):
python.exe esptool.py --chip esp32 --port COM21 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader_1.0.1.bin 0x8000 partitions_microej_multiapp_1.0.1.bin 0x10000 BLACK-ESP32WROVER-RQQAW-1.0.1.bin

Configuring the WiFi Connection

  • Start the ESP32-WROVER with the MicroEJ BLACK Firmware once. It will create a file template for WiFi configuration on the microSD card.
  • 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 the file with te information of your WiFi Access Point (no need for you to add the security settings).
  • Put back the microSD card in the ESP32-WROVER board and power it.
  • The ESP32-WROVER board should connect to the WiFi Access Point, the screen will display the IP of the ESP32-WROVER when connected.

Running the Bluetooth Example

  • Right-click the MicroEJ project com.microej.example.bluetooth.hello.
  • Then Run As > MicroEJ Application.
  • Select the VDE-BLACK-ESP32WROVER-RQQAW Virtual Device.
  • It will instanciate a Run Configuration, you can stop the Virtual Device.
  • Edit the new Run Configuration.
  • Then configure the Execution mode to Execute on Device, Core Engine Default and Settings Local Deployment (Socket)
  • In the Configuration tab in Local Deployment (Socket) insert the IP of the ESP32-WROVER in the Host parameter. You should have the IP displayed on the screen of the ESP32-WROVER (leave the other parameters unchanged).
  • Click on Run button.
  • This will deploy an agent that will periodically send a message to devices connecting to the board through Bluetooth.
  • To view the message you can use the Bluetooth Companion, an Android application that allows the connection to the ESP32-WROVER and display of such message.
  • Download the .apk file
  • Consult the documentation for installing APK files for your phone.

Running the UI Example

  • Right-click the MicroEJ project com.microej.demo.hello.
  • Then Run As > MicroEJ Application.
  • Select the VDE-BLACK-ESP32WROVER-RQQAW Virtual Device.
  • It will instanciate a Run Configuration, you can stop the Virtual Device.
  • Edit the new Run Configuration.
  • Then configure the Execution mode to Execute on Device, Core Engine Default and Settings Local Deployment (Socket)
  • In the Configuration tab in Local Deployment (Socket) insert the IP of the ESP32-WROVER in the Host parameter. You should have the IP displayed on the screen of the ESP32-WROVER (leave the other parameters unchanged).
  • Click on Run button.
  • The demo is displaying a simple UI on display of the ESP32-WROVER.

Running the REST Client Example

  • Right-click the MicroEJ project com.microej.example.iot.ssl.rest.headless.
  • Then Run As > MicroEJ Application.
  • Select the VDE-BLACK-ESP32WROVER-RQQAW Virtual Device.
  • It will instanciate a Run Configuration, you can stop the Virtual Device.
  • Edit the new Run Configuration.
  • Then configure the Execution mode to Execute on Device, Core Engine Default and Settings Local Deployment (Socket)
  • In the Configuration tab in Local Deployment (Socket) insert the IP of the ESP32-WROVER in the Host parameter. You should have the IP displayed on the screen of the ESP32-WROVER (leave the other parameters unchanged).
  • Click on Run button.
  • In the board’s UART link you should have a similar trace printed:
=============== [ Initialization Stage ] ===============

=============== [ Converting fonts ] ===============

=============== [ Converting images ] ===============

=============== [ Launching on Simulator ] ===============

https example INFO: {"headers":{"user-agent":"Resty/0.1 (Java)","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","x-forwarded-port":"443"},"args":{},"url":"https://postman-echo.com/get"}

https example INFO: user-agent: Resty/0.1

https example INFO: =========== POST REQUEST ===========

https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","content-length":"20","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","content-type":"text/plain; charset=UTF-8","x-forwarded-port":"443"},"files":{},"json":null,"data":"My POST request data","args":{},"url":"https://postman-echo.com/post"}

https example INFO: Data sent for POST request: My POST request data

https example INFO: =========== PUT REQUEST ===========

AbstractPage.renderContent()

AbstractPage.renderContent()

https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","content-length":"19","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","content-type":"text/plain; charset=UTF-8","x-forwarded-port":"443"},"files":{},"json":null,"data":"My PUT request data","args":{},"url":"https://postman-echo.com/put"}

https example INFO: Data sent for PUT request: My PUT request data

https example INFO: =========== DELETE REQUEST ===========

https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","x-forwarded-port":"443"},"files":{},"json":null,"data":{},"args":{},"url":"https://postman-echo.com/delete"}
  • It confirms HTTPS communication between the board and the postman-echo.com server.
NEXT STEP

Build a Platform For Your Device

Learn how to create and extend your MICROEJ VEE platform 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 Platform

MicroEJ Developer Forum

Need Help?

Developer forum

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

Go To Forum