Skip to content
falang.ioRU

Falang for Arduino

Falang for Arduino is a desktop app for programming Arduino boards with flowcharts. You draw setup and loop as schemes, describe your wiring in the Devices document, and the app compiles everything into an ordinary Arduino sketch, uploads it to the board and lets you debug it right on the hardware.

  • arduino-cli

    installed — the app uses it to compile and upload, it is not bundled. The app looks for it on PATH, in the usual install locations (Homebrew on macOS, Program Files\Arduino CLI on Windows, ~/.local/bin on Linux) and inside an installed Arduino IDE 2, which ships its own copy. To use a copy somewhere else, start the app with the FALANG_ARDUINO_CLI environment variable set to its full path. If it can’t be found, the Build & Upload dialog says so.

  • The core for your board, installed once with arduino-cli: arduino-cli core install arduino:avr for Uno, Nano and Mega, esp32:esp32 for ESP32.

  • For the RGB strip driver only: arduino-cli lib install “Adafruit NeoPixel”. The other bundled drivers need no extra libraries.

File → New Project… asks for a name, a folder and a board — Arduino Uno, Nano, Nano (old bootloader), Mega 2560 or ESP32 Dev Module. Every project has three fixed documents: setup, loop and Devices; any other scheme you add is a helper function you can call from them. See Project setup for the board binding and the Devices document.

A scheme offers the usual icons plus Arduino-specific ones, which are in the Arduino group of the insert menu (pins and built-in functions) and the Device group (actions of the devices added in Devices).

  • Standard icons — new variable, action, function call, if, switch, loops (for each, from/to, while, cycle) and exits (break, continue, return). Expressions are written in a TypeScript-like syntax limited to what compiles to C++, with Arduino’s own functions and constants available: digitalRead, analogWrite, millis, map, constrain, HIGH/LOW, A0… A7 and so on.

  • Pins: Set digital pin (pin number and a HIGH/LOW switch), Set analog pin (PWM) (a 0–255 slider), Read digital pin and Read analog pin (each stores the reading in a new variable; for the analog read, the pin is the channel number, 0 for A0). Pin modes are set in the Devices document, not with an icon.

  • Built-in functions: Delay, Delay (microseconds), Millis, Micros, Random, Random seed, Serial begin, Serial print, Serial println. Their arguments are fixed numbers; to print a variable, write Serial.println(x) in an action.

  • Driver actions — one icon per action of each installed driver, titled “<driver>: <action>”, for example Servo: Set angle.

Variables can be whole numbers and floating-point numbers of various sizes, and booleans. Strings, arrays and structures are not supported in Arduino projects yet, and neither are the Log and Throw icons — the board has no console or exceptions.

  • Servo — Set angle (pin, 0–180°).

  • DHT11 / DHT22 — Read temperature (°C), Read humidity (%RH); the result is NaN if the read fails. Leave 1–2 seconds between reads.

  • HC-SR04 ultrasonic sensor — Read distance (cm); −1 on timeout.

  • LCD1602 (I2C) and LCD1602 (Parallel) — Clear display, Print text (column, row and text; the text can include expressions as ${…}). Add the display in the Devices document so it is initialized at startup.

  • Addressable RGB strip (WS2812/NeoPixel) — Set pixel color and Show (push the colors to the strip). Needs the Adafruit NeoPixel library.

Only the drivers your sketch actually uses are copied into it.

You can add your own device drivers — per project, or in a personal library shared by all your projects — and manage them from Sketch → Drivers…. See Custom device drivers.

Sketch → Build & Upload… opens a dialog showing the project’s board and a Port list (with Refresh):

  • Compile generates the sketch and compiles it without uploading;

  • Upload compiles the current schemes and uploads them to the board on the selected port;

  • Upload (debug) uploads a build with tracing and starts the debugger.

The generated sketch is src/sketch/sketch.ino in the project folder, together with the drivers it uses; the folder is rewritten on every build. Errors in the schemes are listed with the document name, and an arduino-cli failure shows its full output in the dialog.

The AI agent (Sketch → Agent), version history (Sketch → Version History), export to PDF and coding agents work as in the main Falang app.