Bendyroad IDE reference manual. © Copyright Bendyroad 2024.

Bendyroad IDE reference manual

Index

Blocks

Topics

Objects

AVRdude override

To override the system defaults with a specific AVRdude command line.

When you want to use your own avrdude-like tool.

Property Description
Disabled To disable or enable this block.
Commandline
Comment To optionally enter a comment. It does not impact the generated firmware.

Analog input

Read analog values from a CPU pin.

See also: Example: Ambiant temperature measurement with a TMP36 sensor.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Analog pin Pin number. Specify as: <number>. For example: 5
Controller Specify the controller number to which the input is connected. Leave blank if not relevant.
Comment To optionally enter a comment. It does not impact the generated firmware.

Arduino LCD Keypad Shield

No info available, yet.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Comment To optionally enter a comment. It does not impact the generated firmware.

Arduino Mega board

Arduino Mega board.

See also: Arduino Mega implementation notes

Property Description
Disabled To disable or enable this block.
Name A name for this development board.
On-board LED Variable name to use for the on-board LED on pin D13.
Source for LED Source for driving the LED.
Comment To optionally enter a comment. It does not impact the generated firmware.

Arduino Uno board

Arduino Uno board.

See also: Arduino Uno implementation notes

Property Description
Disabled To disable or enable this block.
Name A name for this development board.
Onboard LED Variable name to use for the on-board LED on pin D13.
Source for LED Source for driving the LED.
Comment To optionally enter a comment. It does not impact the generated firmware.

BH1750 light sensor

The BH1750 is a light sensor that directly outputs illuminance in lux.

It communicates via I²C interface, making it compatible with many microcontrollers. With a wide range and high precision, it's commonly used in lighting control, mobile phones, and weather stations to measure environmental light levels.

GY-30 board containing the sensor
Datasheet BH1750
Property Description
Disabled To disable or enable this block.
Name The name of this block.
I2C bus
Comment To optionally enter a comment. It does not impact the generated firmware.

Blinker

See also: Example: Blinking LED.

The primary function of the Blinker block is to control the timing of on-off cycles. It can be programmed to switch any compatible device on and off at specified intervals, measured in milliseconds.

When the time is 500 milliseconds, the blinker blinks once per second. 500ms on and 500ms off.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Time (ms) Interval in milliseconds. Smaller time intervals result in faster blinking. Minimum value: 5 ms.
Comment To optionally enter a comment. It does not impact the generated firmware.

Data transmission

You configure Telecommand & Telemetry here.

See how all this works together in telemetry.

Deadband

Deadband is a concept referring to a range of input values that do not produce any change in the output. Deadband is used to prevent system instability or unnecessary frequent oscillations, such as a thermostat not turning a heater on and off for minor temperature fluctuations.

Example:

A thermostat is set to maintain the room temperature at 20 degrees Celsius. To avoid the heater turning on or off for every tiny temperature change, it can be given a deadband of, for example, 1 degree.
That way, a temperature drop to 19.9 degrees will not turn on the heater, but a temperature drop to 19.0 or lower will.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Input Input variable
Setpoint Can be a variable or a number
Threshold Width of the range. Example: Setpoint 0, Threshold 1: No output between -1 and 1 (inclusive).
Type
Comment To optionally enter a comment. It does not impact the generated firmware.

Debounce

To de-bounce an input source, like a switch or a pushbutton.

To make sure a switch connection or button push registers only once it's firmly made.

The debounce functionality is already included in the Debounced Switch block.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Source The source (switch, key, sensor) to de-bounce
Comment To optionally enter a comment. It does not impact the generated firmware.

Debounced Switch

Hardware switch to ground, with cpu internal pull-up. Software debounced. (1=switch pressed).

Digital input is commonly used to detect the state of switches and buttons. This block also includes the debouncing (See also: Debounce) of the switch or button.

See also: Example: A simple switch and LED.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Invert Invert the output
Pin Pin number.
Comment To optionally enter a comment. It does not impact the generated firmware.

Derived variable

No info available, yet.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Expression Expression variable
Type Type of variable
Comment To optionally enter a comment. It does not impact the generated firmware.

Digital input

A single input pin on the CPU.

It can have an optional pull-up.

The naming is dependend on the processor or platform.

For instance, on Arduino it looks like: "D2".

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Pin Pin number
Pull-up Check this box to enable the internal pull-up.
Comment To optionally enter a comment. It does not impact the generated firmware.

Digital output

A single output pin on the CPU.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Pin Output pin number.
Source A source that provides input for this block.
Comment To optionally enter a comment. It does not impact the generated firmware.

ESP tool override

To override the system defaults with a specific ESP-tool command line.

When you want to use your own ESP-tool-like tool.

Property Description
Disabled To disable or enable this block.
Commandline
Comment To optionally enter a comment. It does not impact the generated firmware.

ESP32-S3

The ESP32-S3 processor.

See also: ESP32-S3 Implementation notes

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Comment To optionally enter a comment. It does not impact the generated firmware.

GY-30 light sensor

The GY-30, is a module with the BH1750. It is a digital ambient light sensor that provides precise light intensity measurements.

Operating via the I²C interface, it's often integrated into electronics projects, enabling devices to respond to changing light conditions.

GY30
Datasheet GY30Datasheet BH1750
Property Description
Disabled To disable or enable this block.
Name The name of this block.
I2C bus Use when platform has multiple I2C busses.
Comment To optionally enter a comment. It does not impact the generated firmware.

Global variable

No info available, yet.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Initial value Initial value. Default is 0.
Type Type of the variable
Comment To optionally enter a comment. It does not impact the generated firmware.

Hardware Folder

A folder can be used to logically group blocks together.

If you disable a folder, all blocks in it are also disabled.

folder
Property Description
Disabled To disable or enable this block.
Name A name for the folder.
Comment To optionally enter a comment. It does not impact the generated firmware.

IDE Preferences

This contains all the settings, private to your IDE. Shared between all the projects you use on this workstation.

Indicator

No info available, yet.

Property Description
Disabled To disable or enable this block.
Row Display row, starts at 0
Column Column, starts at 0
Expression 1 If this is the first expression evaluated 'true', the corresponding text is displayed
Expr. 1 text Text to display if expression 1 is non-zero
Expression 2 If this is the first expression evaluated 'true', the corresponding text is displayed
Expr. 2 text Text to display if expression 2 is non-zero
Expression 3 If this is the first expression evaluated 'true', the corresponding text is displayed
Expr. 3 text Text to display if expression 3 is non-zero
Comment To optionally enter a comment. It does not impact the generated firmware.

Keyboard handler

Add this for keyboard.

Property Description
Disabled To disable or enable this block.
Keyboard variable Variable that will contain keypresses This can be an expression
Comment To optionally enter a comment. It does not impact the generated firmware.

LCD Display

For connecting a generic LCD display.

You have to assign the pins to this display component.

And the size of the display in rows and columns

Next, define what to show in Screens.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Rows Number of rows
Columns Number of columns
E E: Enable
RS Register Select; 0 = command, 1 = data
DB0 DB0~DB3: Display data signal; lower byte in 8-bit mode
DB1 DB0~DB3: Display data signal; lower byte in 8-bit mode
DB2 DB0~DB3: Display data signal; lower byte in 8-bit mode
DB3 DB0~DB3: Display data signal; lower byte in 8-bit mode
Comment To optionally enter a comment. It does not impact the generated firmware.

LED

A LED connected to a CPU output pin.

An alias for Digital output .

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Pin The pin to which the LED is connected.
Source A source that provides input to this LED. For example a blinker.
Comment To optionally enter a comment. It does not impact the generated firmware.

Logic Folder

A folder can be used to logically group blocks together.

If you disable a folder, all blocks in it are also disabled.

folder
Property Description
Disabled To disable or enable this block.
Name A name for the folder.
Comment To optionally enter a comment. It does not impact the generated firmware.

MQTT

Enable MQTT telemetry.

Is only available on systems with an network connection.

Property Description
Disabled To disable or enable this block.
Comment To optionally enter a comment. It does not impact the generated firmware.

MQTT configuration

To configure the MQTT configuration of the controller direct after programming it.

Example:

mqtt://192.168.1.10

or

mqtts://my.mqtt:1245/

Property Description
URL The full url pointing to the MQTT server

Optimizer hints

To set preferences for the optimization by the firmware generator.

Property Description
Disabled To disable or enable this block.
Optimize for size
Comment To optionally enter a comment. It does not impact the generated firmware.

PWM LED

A dimmable LED.

The brightness is specified in percentage. It ranges from 0 (off) to 100 (full on).

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Pin The pin to which the LED is connected.
Source A source (another block) that sets the intensity of this LED, from 0 (off) to 100 (full on). 50=50% brightness. It is also possible to specify a fixed number here.
Comment To optionally enter a comment. It does not impact the generated firmware.

Page

No info available, yet.

Property Description
Text The text to describe this settings page For example: "Set min/max" Maximum length: depends on screen

Programmer options

Here you configure the target programmer.

The defaults are probably fine, but if you want to use your own programmer program, or use special options, you can configure this here.

Programmer settings

Programmer settings local to this PC.

An menu option for searching the programmer is available for certain programmers.

Property Description
Port Which PC port the programmer is connected to

Project

This represents the top of the project file.

Property Description
Enable experimental When enabled allow experimental blocks in project

Project info

This is only to document your project.

All the fields are for your own administration. They are shown in the generated documentation (if your subscription includes this option).

All fields are optional, you can leave them empty.

Property Description
Project id Optional; project identifier It is not included in the generated program
Project description Optional; free text area to describe this project It is not included in the generated program
Customer Optional; customer name It is not included in the generated program

RGB LED

A RGB LED connected to 3 output pins on the CPU.

Functions the same as 3 PWM LEDs.

Usage

Specify the pins for each colour, and give it a name, for example 'rgb_led'.

Each colour can be set to intensity 0 (off), 25, 50, 75 or 100 (full on), in a logic block.

For example, a logic rule 'set_magenta':

rgb_led.red = 50;
rgb_led.blue = 50;

Because RGB LEDs work with intensity settings from 0 to 100, and Blinker works with on and off only, RGB LEDs can't be used with blinkers.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Red Pin for red LED
Green Pin for green LED
Blue Pin for blue LED
Comment To optionally enter a comment. It does not impact the generated firmware.

Reporting field

See how all this works together in telemetry.

Property Description
Disabled To disable or enable this block.
Variable The variable to report
Tag A number to identify this variable in the telemetry stream. This number has to be unique.
Label
Comment To optionally enter a comment. It does not impact the generated firmware.

Rule

A rule is as block of text with a 'C', Javascript like language to describe logic rules.

For more on rules, see: Rules.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Script Logic rule, for example: if ( temp > 25 ) { fan = 1 ; } else { fan = 0 ; }
Comment To optionally enter a comment. It does not impact the generated firmware.

SP5055

Single chip frequency synthesizer, I2C.

Datasheet SP5050.pdf
Property Description
Disabled To disable or enable this block.
Name The name of this block.
Address I2C address
I2C bus
XTAL frequency
Comment To optionally enter a comment. It does not impact the generated firmware.

Schmitt-Trigger

A Schmitt trigger converts varying analogue inputs into binary outputs with defined thresholds.

It provides noise immunity and hysteresis, preventing rapid switching and ensuring stable signal processing.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Type
Input Input variable
Lower Lower threshold; output will be Off if falling edge is below
Upper Upper threshold; output will be On if rising edge is above
Off Desired output value for 'Off' condition
On Desired output value for 'On' condition
Comment To optionally enter a comment. It does not impact the generated firmware.

Screen Page

A page on a screen.

Read about how this works with other screen elements in Screens.

Property Description
Disabled To disable or enable this block.
Label
Comment To optionally enter a comment. It does not impact the generated firmware.

Serial TLV

Telemetry via a serial connection.

Property Description
Disabled To disable or enable this block.
Comment To optionally enter a comment. It does not impact the generated firmware.

Settings

This is a special screen page definition. It represents a menu driven system for configuring variables within the device.

Property Description
Disabled To disable or enable this block.
EEPROM magic M EEPROM
Comment To optionally enter a comment. It does not impact the generated firmware.

Settings item

Read about how this works with other screen elements in Screens.

Property Description
Initial value Initial value, used until this setting has been changed
Text A short indication of this settings item, for example: MaxTemp
Type Type of variable to use
Unit For example: C, F, rpm, mm, inch
Variable Name of the variable to use

Settings screen

This is a special screen page definition. It represents a menu driven system for configuring variables within the device.

Read about how this works with other screen elements in Screens.

Property Description
Disabled To disable or enable this block.
Label
Comment To optionally enter a comment. It does not impact the generated firmware.

Startup banner

No info available, yet.

Property Description
Disabled To disable or enable this block.
Line 1 Text to display: line 1
Line 2 Text to display: line 2
Time (ms) Time to show banner (milliseconds)
Comment To optionally enter a comment. It does not impact the generated firmware.

System activity LED

This represents a GPIO port that connects to a LED thats lit when the system is active.

In a normal system this looks like a high frequency repeated flash, or dimmed LED.

Property Description
Disabled To disable or enable this block.
Pin The pin to which the LED is connected.
Comment To optionally enter a comment. It does not impact the generated firmware.

Telemetry var mapping

See how all this works together in telemetry.

Telemetry var wildcard

See how all this works together in telemetry.

Property Description
Disabled To disable or enable this block.
Comment To optionally enter a comment. It does not impact the generated firmware.

Text field

Read about how this works with other screen elements in Screens.

Property Description
Disabled To disable or enable this block.
Text Text to show
Row Row to place the text on Rows start at 0
Column Column to start the text on Columns start at 0
Comment To optionally enter a comment. It does not impact the generated firmware.

Timer

No info available, yet.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Script Script to run when timer expires.
Autostart Timer starts automatically.
One-shot Timer runs only once.
Interval Timer interval in milliseconds.
Comment To optionally enter a comment. It does not impact the generated firmware.

Variable and label

Read about how this works with other screen elements in Screens.

Property Description
Disabled To disable or enable this block.
Text Text to display in front of the variable
Variable Variable to display value of
Row Display row, starts at 0
Column Column, starts at 0
Length Total maximum length of text and variable combined
Comment To optionally enter a comment. It does not impact the generated firmware.

Variable field

Read about how this works with other screen elements in Screens.

Property Description
Disabled To disable or enable this block.
Variable Variable to display
Row Row, starts at 0
Column Column, starts at 0
Length The maximum number of positions to be used
Comment To optionally enter a comment. It does not impact the generated firmware.

Wifi configuration

To configure the Wifi configuration of the controller direct after programming it.

Property Description
SSID The name of the access point
Password The password of the access point

os-ticks

No info available, yet.

Property Description
Disabled To disable or enable this block.
Name The name of this block.
Comment To optionally enter a comment. It does not impact the generated firmware.

Topics

Block name

Most blocks have a name. Usually this forms the base of variable names exposed with the block.

For example a sensor measuring temperature and light, with a name 'sensor' the variables exposed would be 'sensor.light' and 'sensor.temp'.

Disable

With disable you can (temporary) exclude a block.

This allows you to quickly exclude parts of the program, for example when testing incomplete hardware.

Also when a folder is disabled, all the blocks inside this folder are also excluded.

Expressions

Free to use fields

There are some fields for your own use.

It has no effect on the generated firmware.

These can be used in documentation, or to make note of important things.

Like:

Pin

A pin is a pin on the controller/cpu.

Also known as GPIO (General Purpose IO).

The names follow a platform specific convention.

Arduino platform

For Arduino platform it looks like:

A8 = Analog port 8
D2 = Digital port 2

You can also use AVR8 notation, when the Arduino has a AVR8 cpu.

AVR8 platform

For AVR8 platform it looks like:

PD0 = Pin 0 on port D.
PB2 = Pin 2 on port B.

Rules

A rule is as block of text with a 'C', Javascript like language to describe logic rules.

See also: Rules reference.

Example:

if ( temp > 25  ) {
    fan = 1 ;
} else {
    fan = 0 ;
}

Screens

Screens is a way to define your screens.

Screens are presented as pages.

Changing pages can be by user control, or program control, or both.

Only 1 page at a time is shown.

Settings page

Settings is a predefined page to edit settings.

Screen page

A normal screenpage consists of labels and fields.

Labels are fixed texts

Fields are dynamic texts, presenting values from variables.

A screenpage is divided in a grid. The origin of the grid is top-left. The grid starts counting with 0,0.

Telemetry

Telemetry is the process of transmitting data from a device to a remote system for monitoring and analysis.

This is useful for monitoring, saving sensor values in a database, make graphs, and many more applications.

telemetry

Telemetry routing

Here you specify which transport to use for the telemetry.

To check if available on your target platform, see: Implementation notes

Telemetry var mapping

This is the folder containing the "Reporting field" items. These specify which variable to send.

Reporting field

To add a value to the data stream, enter the name of the variable (this can be a sensor that you have defined in the Hardware folder) and the tag that you want to assign to it.

The tag is a numeric value, you choose, to give an unique id to the value in the case when the transport mechanism is not able to send texts.

Types

Type Description Minimum Value Maximum Value
BIT BIT is a 1 bit number. 0 1
U8 U8 is an unsigned 8-bit integer. 0 255
U16 U16 is an unsigned 16-bit integer. 0 65,535
U32 U32 is an unsigned 32-bit integer. 0 4,294,967,295
U64 U64 is an unsigned 64-bit integer. 0 18,446,744,073,709,551,615
S8 S8 is a signed 8-bit integer. -128 127
S16 S16 is a signed 16-bit integer. -32,768 32,767
S32 S32 is a signed 32-bit integer. -2,147,483,648 2,147,483,647
S64 S64 is a signed 64-bit integer. -9,223,372,036,854,775,808 9,223,372,036,854,775,807
F16 F16 is a 16-bit floating point number. Implementation-dependent Implementation-dependent

Each of these data types serves a specific purpose and can be used to optimize memory usage and computational performance in your system.

Bits

A BIT represents a binary digit, which is the smallest unit of data in a computer system. It can hold one of two values.

Integer

"Signed" means it can represent both positive and negative values.

"Unsigned" means it can only represent non-negative whole numbers.

Floating

Floating point numbers are designed to represent real numbers, allowing for a wide range of values with varying degrees of precision. The range and precision of these numbers depends on the specific implementation.

See also: The use of Floating-Point Values in Embedded Applications.