ESP32 workflow in DGbasic

Wireless ESP32 Integration

DGbasic ESP32 integration

Drive outputs, read inputs, and bring an ESP32 online without building your own networking layer first. DGbasic generates the server sketch, stores the configuration, and now also lets you add your own device profiles with a custom name, image, pin count and GPIO/PIN mapping.

  • Ideal for electronics hobbyists who want to move quickly from screen to breadboard.
  • Directly useful for home automation, test setups, relay boards and status panels.
  • Fixed workflow with static IP, Test Wifi and clear channel mapping.
  • New: add your own ESP32 device and store a dedicated pin layout and preview image per board.
12 fixed outputs
4 fixed inputs
GPIO2 WiFi connection status LED
Custom device profiles

Why makers choose it

DGbasic turns ESP32 over WiFi from a separate technical project into part of your normal development workflow. That gets you from idea to working hardware much faster. With the new Device button inside ESP32 Configuration you can also store a custom board name, preview image, physical pin count and ESPOUT/ESPIN GPIO/PIN mapping for each board. That keeps DGbasic practical across different ESP32 modules without rebuilding every project from scratch.

1

Fast onboarding

Fill in SSID, password, static IP and token, generate the sketch, and flash your ESP32. After that you can immediately test and switch outputs.

2

Clear channel logic

You work with fixed DGbasic channels instead of raw GPIO numbers. That keeps examples, projects and service work much easier to follow.

3

Ready for real use cases

Use the same workflow for LED banks, sensor inputs, relay cards, home automation tests, machine prototypes and compact measurement rigs.

For electronics and home automation

Electronics hobbyist

Work with push buttons, LEDs, sensors and relays without first building a complete network architecture. DGbasic keeps the entry barrier low while the ESP32 still remains reachable over WiFi.

Home automation and prototyping

Quickly build a test panel for lighting, valves, pumps, shutters or contact sensors. With fixed mapping and Test Wifi you immediately know whether the chain is online and ready to switch.

From configuration to live connection

The workflow is intentionally tight: configure, flash, test, and then immediately switch or read channels from DGbasic.

1

Configure

Open the ESP32 window in DGbasic and fill in SSID, password, static IP, gateway, subnet and token. Those details stay available for later sessions.

2

Flash and verify

Generate the sketch, flash it to the ESP32, and then use Test Wifi to verify that the server is reachable. The built-in LED on GPIO2 also shows that status physically.

3

Control and read

Then use ESPOUT and ESPIN as if they were regular DGbasic commands. That lets you build a hardware test, control panel or automation prototype very quickly.

New: add your own ESP32 device

Besides the standard 2AC7Z profile, you can now save multiple custom devices. Each device can have its own dropdown name, image, pin count, GPIO information and ESPOUT/ESPIN mapping.

What you store per device

  • Custom device name for the dropdown inside ESP32 Configuration.
  • A preview image of the board or pinout.
  • Pin count choices such as 48, 44, 42, 38, 30, 22, 16, 14 or 8.
  • A dedicated GPIO and PIN mapping for every ESPOUT(1..12) and ESPIN(1..4).

Why this matters

Many ESP32 boards share the same software base but expose a different physical pin layout. With device profiles you no longer need to remember which board uses which mapping by hand. You simply pick the correct device and DGbasic uses that mapping in the generated server sketch as well.

Commands you can use immediately

The ESP32 integration uses a small, clear command set. With it you configure the connection, test the server, and write or read the fixed channels.

ESPCONFIG(IP$, Token$)

Define the fixed IP address and security token for your ESP32 server in one line. This is usually the starting point for a project or test session.

ESPIP(IP$)

Change only the target address when you want to use another ESP32 and keep the same token.

ESPTEST / Result = ESPTEST()

Check whether DGbasic can reach the ESP32 server. Useful during installation, service and quick diagnostics.

ESPOUT(Channel)=Value

Switch channel 1 through 12 high or low. This drives the fixed ESP32 output mapping for LEDs, relays, signalling or test outputs.

Value = ESPIN(Channel)

Read channel 1 through 4 for push buttons, contacts, sensor triggers or other digital inputs. That makes it easy to build a control or monitoring setup.

Fixed mapping

DGbasic abstracts the hardware into fixed logical channels. That lets you keep documentation, examples and projects consistent even when multiple ESP32 devices each use their own physical pin layout.

  • ESPOUT(1..12) for the 12 fixed outputs
  • ESPIN(1..4) for the 4 fixed inputs
  • You can now define which GPIO and physical PIN belong to each channel per device profile.
  • Input-only ESP32 pins are intentionally reserved on the input side.

Server and status

The generated sketch includes a simple status route for the IDE. While connecting, the built-in LED on GPIO2 blinks; once WiFi and the server are active, it stays on.

/testwifi for quick checks
/out for output control
/in for input reads

Practical Example: Home Automation Dashboard

With DGbasic and the ESP32 integration, you can easily build your own control panels. The ESP Dashboard below is an example of what you can create for your home automation: switching lights, reading sensors, and controlling devices, all from your custom-designed interface.

DGbasic ESP Dashboard Home Automation Example

From idea to working hardware

Whether you are building an LED panel, testing a relay board, reading a sensor module or prototyping a small home automation setup: this ESP32 workflow gives you a fast and clean route from DGbasic code to a real WiFi-based installation.