Demo project showcasing the usage of various technologies like ESP32, React Native, and WebSocket. The functionality of the project is mainly about controlling a small LED array using a cross-platform mobile application.
The data flow between the ESP32 (embedded system) and the mobile application relies, at the physical layer, on a WI-FI connection and, at the application layer, on a WebSocket connection.
Clone the git project using
$ git clone https://github.com/julian-zatloukal/ESP-32-Mobile-LED-Controller.git
First make sure you have a proper environment to build the application. The project was originally developed on Linux 5.8 Ubuntu 20.10 (Groovy Gorilla) using the official React Native CLI and React Native 0.63.3. Check the React Native CLI Quickstart guide for Android to ensure all dependencies are met.
Then, install npm and yarn dependencies.
$ cd app
$ npm install
$ yarn
Start metro server (here you can see the debug logs)
$ npx react-native start
Compile and run Android application
$ npx react-native run-android
The embedded program has been built using Platformio with the espressif32 platform. It’s recommended using the PlatformIO for VSCode or the PlatformIO Core (CLI) to build the project.
Before uploading the program update the WI-FI credentials inside embedded/src/main.cpp
// WI-FI Configuration
const char *ssid = "your_ssid";
const char *password = "your_password";
- Install the official VSCode extension.
- Open a terminal inside the folder
$ code .
- Press the check mark button at the bottom right of the IDE to compile or press Ctrl+F5.
- To upload the compiled program use the arrow button placed next to the build button.
- Follow the official guide to install the command line utility
- Build the project
$ pio run
- Or build and upload to the board
$ pio run -t upload