Visual Builder to capture sequence of steps

Does anybody has any experience creating a visual builder on an Arduino/ESP32 platform where a number of steps for a protocol can be captured via a drag and drop approach.?Something similar to Lego Masterminds robots where an app allows you to connect execution blocks by dragging and dropping.

1 Like

Hi, have you looked at Nodered? It is a visual coding solution and it can control arduino. I never used it but it is very easy to use a according many friends who use it :slight_smile:

1 Like

Lego Mindstorms robots use a custom version of Scratch believe.

I’m sure there are ways to use Scratch with with Arduino/ESP32, you just have to search. I’m not sure how user friendly those extensions are. The Micro:Bit Scratch support might be more polished.

1 Like

For Arduino, the closest equivalent to Scratch may be Snap4Arduino:


Thank you everybody for your suggestions.
My board uses an esp32 mini d1 due to space/price and stability constraints.

It seems that both CodeRed and SnapForArduino use Firmata under the hood.

Firmata has support only for some ESP boards and last time when I tried was not supporting ESP32 mini. Besides, I believe (and I might be wrong) Firmata will send individual commands in real time from the UI to the ESP via HTTP. My board has to withstand temporary interruptions of the WiFi connection and still actuate the controls so ideally the graphical captured group of steps will be compiled or loaded on the ESP for execution. I don’t have experience with Firmata as I never managed to install it. At this point I’m using WebSockets for connecting the laptop to the ESP because I have some graphs that are updated in real time on the UI and standard HTTP is kind of slow for that. That does not mean I cannot also use HTTP but keeping it consistent would be a plus.

It’s more like a visual scripting language that you might find in a game development suite, but XOD is a graphical programming system and I think it can be set up to flash ESP32. However, I only used it for one smaller project with an Arduino Nano, so I cannot confirm.

Discussion about ESP32 support: ESP32 board support - XOD Community

A few questions:

  • What are the code blocks… can you have your firmware section them into an if else or switch statement… that way, you can just send serial commands. This wouldn’t work for ultra-flexible code building, but if it’s just assembling somewhat separate commands, this may work.
  • If that’s the case, is this over wifi or serial (uart)?

We use SurveyStack and a little androiod apk to send and receive info from our device, works well and is pretty flexible. You’d need to use android if it were uart, but if it were over wifi (same network as whatever phone is running surveystack) you can code it directly in survestack which would be cool.

This might not work for the ESP32, but we have been doing workshops makecode and circuitplayground from Adafruit with Adafruit Circuit Playground Express - Blocks / Javascript editor

and they have a block based editor (and javascript editor) and you can program directly from Chrome with the WebUSB enabled. so that’s been nice!