Tutorial

✨ SoifGo Effects Tutorial

Effects turn your buttons into live visual indicators. When a numeric value arrives — from Bluetooth, MQTT, API, sensors, or the built-in simulator — the button reacts in real time. This guide covers all available effects: Size, Circle, Move, Rotate, Color, Graph, Formula, and ALARM.

🎮 Simulation Setup

If the required hardware for applying values by address to test button actions is unavailable, you can enable the simulator. It provides an internal counter ranging from 1 to 1024, allowing you to prototype and test your button behavior.

The input can also have negative values. When setting the maximum input value, click on the label and also enter the negative input value. For example, if your input is between -20 and 100, set the maximum positive input value to 100 and the maximum negative input value to 20.

How to Use

Simulation setup in SoifGo

⚙️ Setup

Effect settings in SoifGo Effect options menu

📏 Size

Two sliders appear: the upper slider sets width to the far right; the next slider sets height to the top. For maximum variation, place the button at the leftmost and lowest position. In the Play screen, when a numeric value is received — whether via Bluetooth, simulator, API, MQTT, or internal sensors — the button's size begins to change from its initial state toward the configured maximum, in proportion to that value (up to 1024).

This effect can be used in applications such as vertical or horizontal balancers, temperature indicators, tank fill-level displays, and similar cases.

Suitable for balancing visuals like rising water or fuel level, or any growing variable.

⭕ Circle

Renders a circular chart (full or partial) behind the button. Set start and end degrees for the minimum and maximum input. Adjust the button's background for visibility. Ideal for showing input power, throttle, and similar gauges.

↔️ Move

Moves the button to the far right and to the top based on input. Two sliders control motion: the first for horizontal (right), the second for vertical (up). Useful for building thermometers, balancers, scales, tank level, and similar indicators.

🔄 Rotate

Rotates the button up to 360° for maximum input. The first slider sets the start position for input 0; the second sets the end rotation at maximum input. If you are using a needle in the button background and cannot reach a specific position, adjust the initial needle/background rotation after setting the background to achieve the target angle.

Suitable for clocks, pressure/temperature/current/voltage gauges, speedometers, and more.

🎨 Color

Choose a preset from the Select Effect list: Battery, Cooling, Light W (white / brightness), Light R, Light G, Light B and Light Y (red, green, blue, yellow), or None. Each preset sets the button color for the minimum and maximum input—for example, Battery visualizes depletion, and the Light presets increase the intensity of their color from minimum to maximum input.

🎬 Effects Demo

📈 Graph

Draws a line graph of the input on the button. In the settings, select the graph line color and thickness. Drawing is always time-based: the graph is drawn at the interval you set. At the bottom, two sliders are available: the first sets the drawing interval from 100 ms to 60 s; the second controls the graph line thickness.

A button at the bottom of the settings shows the save mode and opens a Select Effect list:

In Play, the graph is drawn on the button at any button size (a larger button is easier to read). Tap the button to open the graph panel (Run, Stop, View, Graph Select), where you can zoom and navigate history pages.

If you want to create another graph or a new group using the same button, simply change the button name in the Edit section. With the new name, fresh graphs will be recorded. To revisit a previous graph, rename the button back to its former name. Don't worry if you forget—saved graphs are stored under their names in the SoifGo/graph folder. Use your file manager to browse and access them anytime.

Graph Demo

🧮 Formula

This feature displays a custom value derived from the input. For example, if input range is 0–1024 but you want 0–512, write val/2. The input variable name is val. Formula authoring uses HTML-like functions.

Available Math Functions with Examples

Function Description Example
+Adds two numbersval+10 → if val=5 → 15
-Subtracts second number from firstval-2 → if val=7 → 5
*Multiplies two numbersval*3 → if val=4 → 12
/Divides first number by secondval/2 → if val=10 → 5
%Remainder of divisionval%3 → if val=10 → 1
Math.powExponentiationMath.pow(val,2) → if val=4 → 16
Math.sqrtSquare rootMath.sqrt(val) → if val=9 → 3
Math.cbrtCube rootMath.cbrt(val) → if val=8 → 2
Math.roundRounds to nearest integerMath.round(3.6) → 4
Math.floorRounds downMath.floor(3.9) → 3
Math.ceilRounds upMath.ceil(3.1) → 4
Math.truncRemoves decimal partMath.trunc(5.7) → 5
Math.froundRounds to 32-bit floatMath.fround(1.337) → 1.337000012
Math.absAbsolute valueMath.abs(-7) → 7
Math.signSign of numberMath.sign(-5) → -1
Math.randomRandom number 0–1Math.random() → e.g. 0.42
Math.PIPi constantMath.PI → 3.14159…
Math.EEuler's numberMath.E → 2.718…
Math.sinSine of angleMath.sin(Math.PI/2) → 1
Math.cosCosine of angleMath.cos(0) → 1
Math.tanTangent of angleMath.tan(Math.PI/4) → 1
Math.logNatural logMath.log(Math.E) → 1
Math.expe^xMath.exp(1) → 2.718…
Math.hypotHypotenuse lengthMath.hypot(3,4) → 5
Math.maxMaximumMath.max(1,9,3) → 9
Math.minMinimumMath.min(1,9,3) → 1
Math.clz32Leading zeros in 32-bitMath.clz32(1) → 31
toRadiansDegrees → radianstoRadians(180) → 3.14159…
toDegreesRadians → degreestoDegrees(Math.PI) → 180

🚨 ALARM

The alarm provides both text and sound notifications. It is triggered when the measured value becomes greater or less than the configured threshold.

⬅ Back to Home