1. Before you start
The EQSP32 is programmed in C/C++ with the EQSP32 library, from the Arduino IDE or from VS Code with PlatformIO. Even the simplest program starts the library's system supervisor, which runs in the background: it keeps the I/O, the communication ports and the network connection going, and makes the controller discoverable by the EQConnect mobile app over Bluetooth. In EQConnect you set the Wi-Fi network and the timezone, and watch the I/O live.
1.1 What you need
| Item | Notes |
|---|---|
| EQSP32 controller | With its USB-C programming port on the front. |
| USB-C cable | A data cable, to upload programs from the computer. Some cables only charge. |
| Computer | For the Arduino IDE 2 or VS Code, with internet access for the downloads. |
| Phone | Android or iOS, with Bluetooth, for the EQConnect app. |
| Power supply | 12 or 24 V DC (7 to 26 V), at least 5 W, to run the EQSP32 on its own once it is programmed. Wiring: see the EQSP32 manual. |
1.2 Choose your tool
2. Set up the Arduino IDE
The video goes through this section from start to finish, and then writes a first program with EQ-AI.
Video: EQSP32 PLC Getting Started Guide, setting up the Arduino IDE and generating sample code with EQ-AI.
2.1 Install the Arduino IDE
Download the Arduino IDE 2 for your operating system from Arduino Software and run the installer. Arduino's own guide, Downloading and installing the Arduino IDE 2, walks through it.
2.2 Install the ESP32 core 2.0.17
The EQSP32 is built around the ESP32-S3, which the Arduino IDE does not support out of the box.
- Open the Boards Manager: the second icon in the left bar, or Tools > Board > Boards Manager. Type
esp32. - In esp32 by Espressif Systems, select 2.0.17 in the version list.
- Press Install.
Use version 2.0.17
The Boards Manager offers the newest version, 3.x, by default. The EQSP32 library is built for core 2.0.17, and the 3.x versions are not supported. If a 3.x version is already installed, select 2.0.17 in the same list and press Install: it replaces the installed version. The Arduino ESP32 Boards package by Arduino, which the same search shows, is not the one to install.
2.3 Install the libraries
- Open the Library Manager: the third icon in the left bar, or Tools > Manage Libraries. Type
EQSP32and press Install on EQSP32 by Erqos Technologies. - Type
RadioLib. In RadioLib by Jan Gromes, select 7.7.1 in the version list and press Install.
Why RadioLib
The EQSP32 library uses RadioLib for its LoRa functions and is built with version 7.7.1, so every EQSP32 program needs it, also on controllers without LoRa. The Library Manager does not install it by itself. Without it the build stops with RadioLib.h: No such file or directory.
The library is also on GitHub: download a release as a ZIP file and add it with Sketch > Include Library > Add .ZIP Library. Arduino's guide Installing libraries shows both ways.
2.4 Board settings
Connect the EQSP32 to the computer with the USB-C cable, then set these four in the Tools menu. Leave the other settings as they are.
| Tools menu | Setting |
|---|---|
| Board | esp32 > ESP32S3 Dev Module (the EQSP32's core is an ESP32-S3) |
| Port | The port of the EQSP32, for example COM14 on Windows |
| Flash Size | 8MB (64Mb) |
| Partition Scheme | 8M with spiffs (3MB APP/1.5MB SPIFFS) |
The Arduino IDE is ready. Continue with 4. Upload your first program.
3. Set up VS Code with PlatformIO
3.1 Install PlatformIO
Install VS Code and its PlatformIO IDE extension, as the PlatformIO installation guide describes.
3.2 Create the project
- Click the PlatformIO icon in the left bar of VS Code and choose Create New Project.
- Type a name for the project.
- Board: Espressif ESP32-S3-DevKitC-1-N8 (8 MB QD, No PSRAM). Framework: Arduino.
- Press Finish. The first project takes a few minutes, while PlatformIO downloads the ESP32 tools.
3.3 Set up platformio.ini
Open platformio.ini in the project folder and replace its contents with these lines:
platformio.ini
[env:esp32-s3-devkitc-1]
platform = espressif32@^6.9.0
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
lib_deps =
erqos/EQSP32@^1.6.0
jgromes/RadioLib@7.7.1
build_flags =
-L.pio/libdeps/esp32-s3-devkitc-1/EQSP32/src/esp32s3
-lEQSP32
lib_depsinstalls the EQSP32 library from the PlatformIO registry, with RadioLib 7.7.1, which it needs.build_flagslinks the library's precompiled code. PlatformIO does not do this by itself, so these two lines are needed. If you rename the[env:...]section, change the folder name in the-Lline to match.espressif32@^6.9.0keeps the project on the ESP32 Arduino core 2.0.17, which the EQSP32 needs. The board already uses 8 MB flash and the 8 MB partition table, the same as the Arduino IDE settings.monitor_speedmatchesSerial.begin(115200)in the program below.
Adding the library from PIO Home > Libraries (search for EQSP32, then Add to Project) writes the same lib_deps line; RadioLib and the build_flags lines still have to be added by hand. PlatformIO downloads both libraries at the first build.
4. Upload your first program
4.1 The program
Copy this program into a new sketch in the Arduino IDE and save it as HelloEQSP32, or into src/main.cpp in PlatformIO.
HelloEQSP32
#include <EQSP32.h>
EQSP32 eqsp32;
void setup() {
Serial.begin(115200);
eqsp32.begin(true); // start the EQSP32 system; true = print system messages
}
void loop() {
Serial.println("Hello EQSP32");
delay(5000);
}
eqsp32.begin() starts the EQSP32 system supervisor. Every EQSP32 program calls it once in setup(), before any other EQSP32 function. With true the supervisor prints its system messages to the Serial Monitor; begin() without it keeps them off, so your own messages are easier to follow.
4.2 Upload it
Power while programming
While the USB-C cable is connected for programming, switch off the external supply on VIn: the EQSP32 then runs on the USB 5 V. Switch the external supply back on once the program is uploaded.
- Arduino IDE: press Upload (the arrow button at the top). Then open Tools > Serial Monitor and set it to 115200 baud.
- PlatformIO: press Upload (the arrow in the status bar at the bottom), then Serial Monitor (the plug icon next to it).
4.3 What you should see
The buzzer sounds once when the library starts. The LEDs then show the controller's state:
| LED | Now | Meaning |
|---|---|---|
| Power (green) | On | The EQSP32 has power. |
| Bluetooth (blue) | Flashing | Discoverable by EQConnect, for 3 minutes after the start. |
| Status (red) | On | No timezone set yet. It goes off once you set one in EQConnect (5.4). |
| Wi-Fi (blue) | Off | No Wi-Fi network set yet (5.3). |
The Serial Monitor shows the system messages, and Hello EQSP32 every 5 seconds.
4.4 Library examples
The library comes with more than 40 examples: File > Examples > EQSP32 in the Arduino IDE, or the examples folder of the library in PlatformIO (.pio/libdeps/esp32-s3-devkitc-1/EQSP32/examples). They cover the I/O modes, every EQX expansion module, the serial ports, Modbus, MQTT and Home Assistant, CAN bus, LoRa and more.
5. Configure it with EQConnect
EQConnect is the EQSP32's mobile app. Over Bluetooth it sets the controller's Wi-Fi network, timezone and IoT settings, and shows its I/O live. It works with any program that calls eqsp32.begin(), such as the one in section 4.
5.1 Get the app
5.2 Connect over Bluetooth
EQConnect searches for EQSP32 controllers nearby by itself. When it finds some, a window lists them by device name: pick yours to connect.
The EQSP32 is discoverable while its Bluetooth LED is flashing. If the LED is off, a short press on the BOOT button makes it discoverable for 3 minutes.
5.3 Set up Wi-Fi
Open the Wi-Fi tab: the EQSP32 scans for networks in range and lists the strongest. Pick your network, type its password and press Connect. The Wi-Fi LED stays on once the EQSP32 is connected.
The EQSP32 keeps the network settings in its flash memory and reconnects by itself after a restart or a new upload. Holding BOOT for 3 seconds clears them.
5.4 Set the timezone
Open the Timezone tab and choose your region. A list of countries and cities appears: pick your location, and EQConnect sets the timezone on the EQSP32, including the change to and from daylight saving time where your region has it.
The red status LED goes off.
5.5 IoT Configuration
On the Connection tab, tap the gear icon or the IoT Config label. Here you choose a static IP address or DHCP, change or remove the password for over-the-air (OTA) updates, and turn the MQTT connection on or off.
5.6 EQMonitor
EQMonitor shows the configured mode and the present state of every EQSP32 I/O, the supply voltages in and out, the Wi-Fi signal strength and the local time.
When expansion modules are connected, the side-connector button becomes available: tap it to list the detected modules, then pick one to monitor it.
5.7 BLE serial terminal
EQConnect includes a BLE serial terminal in the style of the Nordic UART Service (NUS). It connects straight to the BLE serial link that the EQSP32 library runs, so your program can exchange text with the phone without any BLE code of its own.
Use it to send commands and watch values, for provisioning, for your own data exchange, or as the starting point of your own BLE app. Example: EQSP32_BLE_Serial_NUS_Demo.
6. Connect it to your systems
Once it is on your network, the EQSP32 talks to the systems you already use. The library handles the protocols, and each row has a ready example under File > Examples > EQSP32.
| To connect with | Start from the example |
|---|---|
| Home Assistant, Node-RED or any MQTT broker | EQSP32_HomeAssistant_Monitoring_DemoEQSP32_HomeAssistant_Control_DemoEQSP32_MQTT_MemoryOptimized_Demo |
| SCADA systems, HMIs and PLCs over Modbus TCP | EQSP32_ModbusTCP_Server_DemoEQSP32_ModbusTCP_Client_Demo |
| Modbus RTU devices on RS-485 | EQSP32_ModbusRTU_Master_DemoEQSP32_ModbusRTU_Slave_Demo |
| Web services and cloud APIs over HTTPS | EQSP32_HTTPS_REST_API_Demo |
| E-mail alerts | EQSP32_SMTP_Email_Alert_Demo |
| A dashboard on your phone (DashIO) | EQSP32_DashIO_Basic_DemoEQSP32_DashIO_MultiScreen_Demo |
| A web page served by the EQSP32 itself | EQSP32_WebServer_Basic_UI_DemoEQSP32_WebServer_AJAX_UI_Demo |
| CAN bus devices | EQSP32_CAN-Bus_Demo |
The MQTT settings are made in your program (the EQSP32Configs structure, described in the EQSP32 manual) and in EQConnect's IoT Configuration (5.5).
7. Next steps
- Add I/O: EQX expansion modules connect to the side of the EQSP32. Each has an example in the library and a manual: Manuals.
- Plan a system: EQComposer puts together the controller and modules for the I/O you need.
- Write code faster: EQ-AI writes EQSP32 code from your description in plain English.
- Program in IEC 61131-3: the OpenPLC user manual.
- Learn from projects: Tutorials.
- Look up the hardware: the EQSP32 manual covers the pinout, power, I/O modes and LEDs.
- Library source and releases: github.com/Erqos/EQSP32.
8. Troubleshooting
| What you see | What to do |
|---|---|
| The build fails with errors inside the EQSP32 library or the ESP32 core | Check the core version in the Boards Manager: esp32 by Espressif Systems must be 2.0.17 (2.2). In PlatformIO, keep platform = espressif32@^6.9.0 (3.3). |
RadioLib.h: No such file or directory | Install RadioLib 7.7.1 in the Library Manager (2.3), or add it to lib_deps (3.3). |
PlatformIO: undefined reference to `EQSP32::begin(bool)' | The build_flags lines are missing, or their folder does not match the [env:...] name (3.3). |
| No port in Tools > Port, or the upload cannot connect | Use a USB-C data cable (some cables only charge) and try another USB port of the computer. |
| The Serial Monitor shows unreadable characters | Set it to 115200 baud. |
| EQConnect does not find the EQSP32 | Check that Bluetooth is on in the phone. The Bluetooth LED of the EQSP32 must be flashing: if it is off, press BOOT briefly. A program that calls eqsp32.begin() must be running. |
| The EQSP32 does not join the Wi-Fi network | The EQSP32 uses 2.4 GHz Wi-Fi: choose a 2.4 GHz network, and check the password. |
| The Wi-Fi settings are gone after an upload | In the Arduino IDE, Tools > Erase All Flash Before Sketch Upload was enabled: set it back to Disabled. |