Now a variable is assigned to a button. You can see all relations of a button in the Programming window.
1. When a label is pressed, it does not change its state, but it takes a value from the value field set in the dialogue window of assigning a vriable, and sends it to equipment.
2. An item can display values that come from equipment in the text format. For example, values of temperature or air humidity.
Now a variable is assigned to a button. You can see all relations of a button in the Programming window.
1. In the (Feedback: On, Repeat: True) endless cycle a button will play animation changing its states with a set period of time (Time Up / Time Down).
An example of such a button is blinks on a company logo.
2. If a button is activated by holding it (Feedback: Momentary, Repeat: True) , the states will change one another as long as a button is held, and changes will stop when a button is released.
For example, such a button can be used to, if they are closed / opened by holding a button.
3. If a button is activated by getting non-zero values from equipment (Feedback: Blink / Channel, Repeat: True), changes of states will start when any non-zero value, for example, 1 comes from equipment and changes will stop if 0 is received
Such a button can be used to display the speed of a fan.
Drag'n'drop a variable onto a trigger and enter the following in the dialogue window:
Now a variable is assigned to a trigger. You can see all relations of the trigger in the Programming window.
1. A button reads a value from a feedback channel of a variable and compares it to values in Value1 and Value2.
2. If a value matches, the button changes its state to the corresponding one (Value1 = Off, Value2 = On). If there comes a value that is not entered in Value1/Value2, the buttons takes on a value set in DefaultValue.
For example, Value1 = 0, Value2 = 1, the light is turned on and 1 comes to a feedback channel, the button changes it state to the On one.
3. When aTrigger Button is pressed, it changes its state to the opposite one, and a value corresponding to this state (Value1 = Off, Value2 = On) is sent to equipment
For example, when a button is pressed, 1 is sent to a channel, the light is turned on and the button changes its state to the On one.
4. A button can be set like a Radio Button. In this case several Trigger Buttons are united by one logic. When one item from this group is pressed, all other items change their states to inactive ones.
Such behavior of buttons can be seen when a flag is put to an item in a list.
A radio button is an interface item which allows to select one of the preset options. In iRidium Radio Buttons are not separated as an item type as they can be set up on the basis of a Trigger Button.
The task of Radio Buttons is to send to variables values from different buttons from which you can select only one.
Settings and behavior of a radio button depend on the equipment variable you work with. Here are several cases and examples of setting.
Drag'n'drop a variable onto a button and enter the following in the dialogue window:
Now a variable is assigned to an UP / Down button. You can see all relations of a button in the Programming window.
1. When an Up/Down button is pressed, it takes a value from a feedback channel of the variable.
For example, the lamp brightness is 45%, and the value in the channel is also 45.
2. After it a value from the «UpDownStep» field is added to the value from the channel «UpDownStep».
For example, it is «-10». 45 +«-10» = 35.
3. The resulting value (35 in our example) is sent to a channel assigned to the button.
4. When a button is held, a value from the «Up Down Hold Step» field is added to the value from the channel.
For example, it is «-25». 45 +«-25» = 15.
5. Is the value to send is large than the value in the «Up Down Limit» filed, a value from this field is sent. After is a button stops sending data until a value in the feedback channel changes.
Works only if the device has a feedback channel.
Drag'n'drop a variable onto a level and enter the following in the dialogue window:
LIST OF TEMPLATES
| Template |
Function
|
| $V |
the integer part of the received value
|
| $F1 ... $F5 |
float value. From 1 to 5 - number of symbols after a point
|
| $F,1 ... $F,5 |
float value. From 1 to 5 - number of symbols after a comma
|
| $S |
current Item state number
|
| $X |
the value in the HEX type
|
| $$ |
the $ symbol
|
| $P |
(levels only) the current value in percentage of Level maximum
|
| $H |
(levels only) the upper Level value
|
| $A |
(levels only) the upper value minus the lower value of Level
|
| $L |
(levels only) the lower Level value
|
| $R |
(levels only) the Level range: the upper value minus the lower value
|
A template is entered into the text field of a graphic Item and can be combined with other text or symbols (comments, units of measurement)
Now a variable is assigned to a level. You can see all relations of the level in the Programming window.
Operation Principles
A level can be used both to control an item and to display values from a feedback channel.
For example, when a slider is pressed or moved, a value from the level is sent to equipment. When a slider is set at 25, a dimmable lamp is switched on with 25% brightness. When a lamp is dimmed manually, a value comes to a feedback channel and it is displayed on a level.
Multistate Level (level with animation)
Multistate Level is a graphic item that has more than 2 states. A press on a level sends to a variable a number that corresponds to the current position of the slider. But there is no level as it is. Instead of it a level displays one of its states that corresponds to the selected value or a range of values. Each state of a multistate level can have its own image, text, color. For example, such an image can be used to display the connection status of equipment (online, offline, waiting for connection).
Item Parameters
| Type
|
Multistate Level
|
| Feedback
|
Reaction of a level to being pressed by a user and to getting data from equipment:
- Channel - states are changed when a multistate level is pressed and when data are received.
|
| Min / Max
|
Limits of a level: determine a range of values within which a multistate level works.
|
| Direction
|
Direction of a level:
- Vertical - the slider of a level moves vertically,
- Horizontal - the slider of a level moves horizontally.
|
| Invert
|
The upper and the lower part of a vertical level change places, thus shots are changed from the last to the first one.
|
Assigning to Equipment
Drag'n'drop a variable on a level and enter the following in the dialogue tp assign a variable:
| Send to command
|
Value from object - send to a variable a value taken from the current position of the slide of alevle in the Min...Max range.
|
| Event for Action
|
An event in the interface connected with the item. When the event happens, a set value is written in the variable:
- When pressed - send a value when a slider is pressed,
- When released - send a value when a slider is released,
- When moved - send intermediate values when a slider is moved.
Add the Delay command (100) before a command of the Move event, to decrease the load of equipment (with the Delaycommand, a Move event will work once in 100 ms).
All three events can be used at the same time.
|
| Assign feedback channel
|
(Create a feedback channel) Put this tick, as it is required for a level slider to move according to the current state of the variable.
|
Now a variable is assigned to a level. You can see all relations of the level in the Programming window.
Operation Principles
1. A level take a vlue from a feedback channel of a variable and displays a state which number corresponds to the value of the variable.
For example, a lamp is on with 45% brightness, a value in the feedback channel is 45 and the level display state 45.
2. If the max number of level values is more than the number of states, a level considers the maximum as 100 % and displays a corresponding state. For example, a value receives values from 0 to 100, and the number of states is 50. When the value of 40 is received from the feedback channel of a aribale, the level displays State 20.
3. When the slider of a level is pressed or moved, a value from the level is sent to equipment.
For example, by setting the slider of a level at 25, a dimmable lamp is turned on width 25% brightness.
Circular level
Circular level is a type of levels where a slider moves clockwise or counterclockwise. When a slider is pressed or moved along a level it sends to the variable a value that corresponds to its current position. It works only if a device has a feedback channel. For example, when the value of 25 is set on a level, a dimmable lamp is tuned on with 25% brightness.
Item Parameters
| Type |
Circular Level
|
| Feedback |
Reaction of a level to user pressing and to getting data from equipment
- Channel - sends a value and displays feedback (a slider moves when data are received)
|
| Level Mode |
Modes of a circular level:
- Simple (with one slider and one active zone),
- Double (with two sliders),
- Triple (with three sliders),
- Looped (endless).
|
| Level Min Angle / Level Max Angle |
Limits of the rotation angle of a slider in degrees: admissible values are from 0 to 360, the start and the direction of the rotation angle is 12 of a clock-face. You can set values for "Level Min Angle" / "Level Max Angle" equal to 0 and 360, in this case a circular level will rotate without angle limits.
|
| Min / Max |
Limits of changing the level value
|
| Invert |
Direction of level rotation:
- False - clockwise,
- True - counterclockwise.
|
| Range |
Type of range:
- Integer - integer
- Float - floating point
|
| Active Zone |
The size of an active zone in per cent from 0 to 100:
- 100 - the whole squire of a circular level is an active zone,
- 0 - no active zone, only the zone of a slider (sliders).
|
| DrawFullFirstState |
Displaying the inactive sector of a circular level:
- False - a circular level is not displayed in the inactive sector,
- True - a complete circular level is displayed (Empty state is displayed in the inactive sector).
|
| Slider1 Cursor |
Slider appearance
|
| Slider1 Cursor Color |
The color of a slider
|
| Slider1 Cursor Image |
Slider images are located in project gallery (a slider must be pointed to the top). This property is available when "Custom" is selected in the "Slider1" Cursor property.
|
| Slider1 Offset |
A slider image can be moved in pixels along the slider axis from the center of a circular level to its upper point. It is always a nonnegative value.
|
| Slider1 Cursor Scale |
Adjusting a slider image to the size of a circular level:
- None - save the original size of an image,
- Proportional - change the size of an image proportionally to the size of a circular level.
|
Assigning to Equipment
Drag'n'drop a variable onto a level and enter the following in the dialogue window:
| Send to command
|
Value from object - send to a variable a value taken as the current position of the level slider in the Min Value...Max Value range.
|
| Event for Action
|
An event in the interface connected with the item. When the event happens, a set value is written in the variable:
- When pressed - send a value when a slider is pressed,
- When released - send a value when a slider is released,
- When moved - send intermediate values when a slider is moved.
Add the Delay command (100) before a command of the Move event, to decrease the load of equipment (with the Delay command, a Move event will work once in 100 ms).
All three events can be used at the same time. .
|
| Assign feedback channel
|
(Create a feedback channel) Put this tick, as it is required for a level slider to move according to the current state of the variable.
|
Now a variable is assigned to a level. You can see all relations of the level in the Programming window.
Operation Principles
1. A level takes a value from the feedback channel of a variable.
For example, a lamp is on with 45% brightness, and the value in the channel is also 45.
2. When a slider is pressed or moved along the circular axis, a value from the level is sent to equipment.
For example, if the slider of a level is set at 25, a dimmable lamp is turned on with 25% brightness.
3. A circular slider has several modes:
- Simple - a simple circular slider that can be used to control volume, light, etc.
- Looped - an endless circular level.
This level is convenient to use if an exact value must be set.
For example, it can be used to set sound volume (values from 0 to 100 ), if the value is 60 music is quiet, when the value is 65, it is too loud, and 62 is the most suitable value. It can be difficult to set intermediary values on a simple circular level. In this case a endless level can be used.
- Double - a level with two values.
It can be used, for example, to set a temperature sensor. In this case one value is the set temperature of a sensor and the other value is the current temperature in the room. Heating will work until it reaches the set temperature.
- Triple - a level with three values.
An example of use is the same as an example for a double circular level. But in the triple mode 3 values can be set: min, max and current temperature.
Modes of a circular level
Simple - a simple circular level can be used to control volume, brightness, etc.
Looped - endless circular level
This level is convenient to use if it is required to set an exact value. When this mode is chosen there appears “Changing Angle” property that sets the number of full turns to reach the max value.
For example, it can be used to control volume (level values from 0 to 100). When the value is 60 music is quiet, and it is too loud when the value is 65, and 62 is the most suitable value. It can be difficult to set intermediary values on a simple level. In this case an endless level can be used.
To do it, select a required mode of a circular level and set required values (2 - one turn = 50, 4 - one turn = 25, etc.) in "Changing Angle". 62 value can be easily set this way.
Double - a level with two values.
It can be used, for example, to set a temperature sensor. In this case one value is the set (required) temperature and the other value is the current temperature. And heating will stop working only when the current temperature reaches the required one.
To set it, do the following:
1 Set Double mode
2 Set Pass Through in the Hit parameter of one of the values of a slider for a user not to be able to control it. This value will display the current temperature.
3 Create a script. In the given example a Modbus device is used.
var point;
IR.AddListener(IR.EVENT_ITEM_RELEASE,IR.GetItem("Page 1").GetItem("Circle level"), function(){
data = IR.GetItem("Page 1").GetItem("Circle level").Value2;
});
var Modbus = IR.GetDevice("Modbus TCP");
IR.AddListener(IR.EVENT_CHANNEL_SET, Modbus, function() {
var temperature = IR.GetVariable("Drivers.Modbus TCP.Feedback 1");
IR.GetItem("Page 1").GetItem("Circle level").Value1 = temperature;
if(temperature>=point+2){
IR.SetVariable("Drivers.Modbus TCP.Channel 1", 0);
}
if(temperature<=point-2) {
IR.SetVariable("Drivers.Modbus TCP.Channel 1", 1);
}
});
Triple - a level with three values.
An example of using this mode is the same as in th Double mode, but this mode allows to set 3 values: min, max and current temperature. Thus, heating will be turned on when the temperature is min and it will be turned off when the temperature is max. Thus, control of temperature is a room can be totally automated.
Setting this mode is very similar to setting the Double mode.
1 Set Triple mode
2 Set Pass Through in the Hit parameter of one of the values of a slider for a user not to be able to control it. This value will display the current temperature.
3 Create a script. In the given example a Modbus device is used.
var min;
var max;
IR.AddListener(IR.EVENT_ITEM_RELEASE,IR.GetItem("Page 1").GetItem("Circle level"), function(){
min = IR.GetItem("Page 1").GetItem("Circle level").Value1;
max = IR.GetItem("Page 1").GetItem("Circle level").Value2;
});
var Modbus = IR.GetDevice("Modbus TCP");
IR.AddListener(IR.EVENT_CHANNEL_SET, Modbus, function() {
var temperature = IR.GetVariable("Drivers.Modbus TCP.Feedback 1");
IR.GetItem("Page 1").GetItem("Circle level").Value3 = temperature;
if(data>=max){
IR.SetVariable("Drivers.Modbus TCP.Channel 1", 0);
}
if(data<=min) {
IR.SetVariable("Drivers.Modbus TCP.Channel 1", 1);
}
});
Multistate circular level (circular level with animation)
Multistate circular level is a circular level that has more than 2 states. Changes of level values (turns or rotations) send to a variable a number that corresponds to the current position of a slider. But there is no slider as it is. Instead of it, the level shows one of its States, the one that correspond to the chosed value or a range of values. Each state on an animated level can have its own image, text and color. This level can be used to display the temperature of a thermostat, the brightness of light, the level of sound volume, etc.
Item Parameters
| Type |
Multistate Circular Level
|
| Feedback |
Reaction to being pressed by a user and getting data from equipment:
- Channel - sends a value and displays feedback (a slider moves when data are received).
|
| LevelMode |
Modes of a multistate circular level:
- Simple (with one slider and one active zone),
- Double (with two sliders),
- Triple (with three sliders),
- Looped (endless).
|
| Level Min Angle / Level Max Angle |
Limits of the rotation angle of a slider in degrees: admissible values are from 0 to 360, the start and the direction of the rotation angle is 12 of a clock-face. You can set values for "Level Min Angle" / "Level Max Angle" equal to 0 and 360, in this case a circular level will rotate without angle limits.
|
| Min / Max |
Limits of changing the level value.
|
| Invert |
Direction of level rotation.
- False - clockwise,
- True - counterclockwise.
|
| Range |
Type of range:
- Integer - integer,
- Float - floating point,
|
| Active Zone |
The size of the active zone in per cent, from 0 to 100:
- 100 - all the square of a circular level is an active zone,
- 0 - no active zone, only the zone of a slider (sliders).
|
| DrawFullFirstState |
Displaying the inactive sector of a circular level:
- False - a circular level is not displayed in the inactive sector,
- True - a complete circular level is displayed (Empty state is displayed in an inactive sector).
|
| Slider1 Cursor |
Slider appearance.
|
| Slider1 Cursor Image |
The image of a slider in the project gallery (a slider must be displayed with a pointer upwards). This property is available when setting Custom value in Slider property.
|
| Slider1 Offset |
A slider image can be moved in pixels along the slider axis from the center of a circular levelr to its upper point. It is always a nonnegative value.
|
| Slider Cursor Scale |
Adjusting a slider image to the size of a circular level:
- None - save the original size of an image,
- Proportional - change the size of an image proportionally to the size of a circular level.
|
Assigning to Equipment
Drag'n'drop a variable onto a level and enter the following in the dialogue window:
| Send to command
|
Value from object - send to a variable a value taken as the current position of the slider in the Min Value...Max Value range.
|
| Event for Action
|
An event in the interface connected with the level. When the event happens, a set value will be sent to the variable:
- When pressed - send a value when the level is pressed,
- When released - send a alue when the level is released,
- When moved - send all intermediary values when the slider is moved.
Add the Delay (100) command to the When moved event, not to overload the equipment (with the Delay command the When moved event will work once in 100 ms).
All three events can be used simultaneously.
|
| Assign feedback channel
|
(Create a feedback channel) Put this tick as it is required for the level slider to move according to the current state of the variable.
|
Now a variable is assigned to a level. You can see all relations of the level in the Programming window.
Operation Principles
1. Multistate circular level takes a value from a feedback channel of a variable and displays a state which number corresponds to the value of this variable.
For example, a lamp is on with 45% brightness, the value in the channel is also 45 and the level displays state 45.
2. If the max number of level values is more than the number of states. a level considers the max value as 100 % and displays states according to it.
For example. a level receives values from 0 to 100, and the number of states is 50. When the value of 40 is received from the feedback channel of a variable, the level will display State 20.
3. When the slider of a level is pressed or moved, the value from the level is sent to equipment.
For example, if the slider of a level is set at 25, a dimmable lamp is turned on with 25% brightness.
Joystick
Joystick is a graphic item with a cursor that has 1 state. It has X and Y coordinates - the current position of a cursor. The range of cursor movement is limited by min nd max values. It allows to get the color under the cursor to control RGB lighting.
Item Parameters
| Type
|
Joystick
|
| Feedback
|
reaction to events
- Momentary – a cursor is moved by a user
|
| MinX ... MaxX / MinY ... MaxY
|
movement range of a cursor along X and Y axes.
|
| Range
|
Type of range
- Integer - integer,
- Float - floating point.
|
| InvertX / InvertY
|
min and max on X and Y axes change their places.
|
| Slider1 Cursor
|
Appearance of a cursor.
|
| Slider1 Cursor Color
|
The color of a cursor.
|
Assigning to Equipment
A variable can be assigned to a joystick directly of via a script. It is usual to use a script to get the color under the cursor and to send components of a color to channels to control RGB strip.
RGB LED strips are controlled with the help of DMX controllers and have one of the following configurations:
- Red, Green, Blue - three channels to control the color of the LED strip. Brightness is decreased by decreasing brightness of separate color channels.
- Red, Green, Blue, Alpha - four channels to control the color and brightness of LED strips.
variant 1 Control RGB strip with the help of thee (four) items Level.
3 (4) Unsigned 8-bit variables (Subtype: VALUE) are created in a project. The variables are controlled in the 0...255 range, Increase of value in a channel corresponds to the increase of brightness of the corresponding color.
variant 2 Control RGB strip with the help of a palette.
Any multi-colored item can be used as a palette. When a finger presses the this item a command is sent to equipment to set the chosen color.
A script must be added from the RGB library to do it. A script is added only 1 time, later on it can be used to control RGB strips of any other built-in iRidium drivers.
2.1 Create a palette and other required items. Any multi-colored image can be used as a palette.
- Set the palette like a Joystick with 0...100 range along the Х and Y axes;
- Set an inactive Button to display a color chosen on the palette;
- If it is required set active Buttons to change the brightness of the strip by steps.
2.2 Downloas the followinf file RGB_Library.js
- This file provides control of color with JavaScript. Add the file to your visualization project. To do it, open your project in iRidium Studio, and click
, select ( + ) "Add Script From File".
2.3 Create an empty script file: ( + ) "New Script" to add a description of your RGB palette to it:
- Describe the palette and the item displaying a selected color in the script file:
///////// Copy this function to make one more RGB palette ///////
RGB_player(
"Driver", // Driver in project
"Channel Red", // Name of Red Channel
"Channel Green", // Name of Green Channel
"Channel Blue", // Name of Blue Channel
255, // Top limit for RGB channel (100 or 255)
IR.GetItem("Page 1").GetItem("Item Color Picker 1"), // Item "Color Picker"
/////// optional parameters ///////////////////////////
IR.GetItem("Page 1").GetItem("Item Display 1"), // Item "Display"
)
An advanced variant contains buttons to control brightness:
A palette to display colors and +/- buttons to control brightness
///////// Copy this function to make one more RGB palette ///////
RGB_player(
"Driver", // Driver in project
"Channel Red", // Name of Red Channel
"Channel Green", // Name of Green Channel
"Channel Blue", // Name of Blue Channel
255, // Top limit for RGB channel (100 or 255)
IR.GetItem("Page 1").GetItem("Item Color Picker 1"), // Item "Color Picker"
/////// optional parameters ////////////////////////////
IR.GetItem("Page 1").GetItem("Item Display 1"), // Item "Display"
IR.GetItem("Page 1").GetItem("Up 1"), // Item "Up"
IR.GetItem("Page 1").GetItem("Down 1"), // Item "Down"
10 // Increment step for "Up" and "Down"
)
Write in the description where the palette is located and what equipment it sends data to:
- IR.GetDevice("Driver") - the name of a driver where RGB commands will be sent. Copy the name from PROJECT DEVICE PANEL;
- "Channel Red", "Channel Green", "Channel Blue" - names of variables (Commands), that control red, green and blue components of colors. Copy names from PROJECT DEVICE PANEL. Names of Commands must agree with the names of Feedbacks, where from data about the current color of RGB strip comes.
HDL-Buspro, Domintell - has a unique way to write names. <name of device in the network>:<name of channel> must be written for them, for example "Dimmer in Bedroom:Channel 1";
- 255 - the max value of brightness for each color. Brightness is controlled in the range from 0 to 255 for most equipment, but there are drivers that control brightness in the 0...100 range (for example, HDL). For HDL-Buspro enter 100 in this line of settings;
- IR.GetItem("Page 1").GetItem("Item Color Picker 1") - the name of a page ("Page 1") and an item on it ("Item Color Picker 1") that will be used as a palette;
- IR.GetItem("Page 1").GetItem("Item Display 1") - the name of a page ("Page 1") and anitem on it ("Item Display 1") that will be used to display a color selected on the palette;
- IR.GetItem("Page 1").GetItem("Up 1") - the name of a page ("Page 1") and an item on it ("Up 1") that will increase the brightness of a selected color when it is pressed;
- IR.GetItem("Page 1").GetItem("Down 1") - the name of a page ("Page 1") and an item on it ("Down 1") that will decrease the brightness of a selected color when it is pressed;
- 10 - a value, by which brightness of a selected color will increase/decrease when Up and Down buttons are pressed.
2.3 Click "OK" to save the palette description. Start the Emulator to test its work.
Errors that may occur if a palette malfunctions are display in the log (F4).
variant 3 Control an RGBW strip with the help of a palette and a level.
Any colored item can be used as a palette - you'll send commands to equipment about setting a chosen color by touching any place of the item. Use a Level to control brightness.
A script must be added from the RGBW library to do it. A script is added only 1 time, later on it can be used to control RGB strips of any other built-in iRidium drivers.
3.1 Create a palette and other required items (a level, a button, etc.). Any multi-colored image can be used as a palette.
- Set a pallete as a Joystick with a 0...100 (255) control range along Х and Y axes;
- Set the Level to change brightness of light with a 0...100 (255) control range;
- Set an inactive Button that will display a color chosen on the pallete;
- If it is required, set inactive Buttons that will change the brightness of the strip by steps.
3.2 Download the following file RGBW_Library.js
- This file provides control of color with JavaScript. Add the file to your visualization project. To do it, open your project in iRidium Studio, and click
, select ( + ) "Add Script From File".
3.3 Create an empty script file: ( + ) "New Script" to add a description of your RGBW palette to it:
- Describe the palette and the item displaying a selected color in the script file:
///////// Copy this function to make one more RGBW palette ///////
RGBW_player(
"Driver", // Driver in project
"Channel Red", // Name of Red Channel
"Channel Green", // Name of Green Channel
"Channel Blue", // Name of Blue Channel
"Channel White", // Name of White Channel
255, // Top limit for RGBW channel (100 or 255)
IR.GetItem("Page 1").GetItem("Item Color Picker"), // Item "Color Picker"
IR.GetItem("Page 1").GetItem("Item White Level"), // Item "White Level"
/////// optional parameters for feedback color and white channel value ///////
IR.GetItem("Page 1").GetItem("Color Display"), // Item "Color Display"
IR.GetItem("Page 1").GetItem("Item White Level") // Item "White Display"
);
Write where the pallete is located and what equipment it sends commands to in the description:
- IR.GetDevice("Driver") - the name of a driver to which RGBW commands are sent. Copy the name of the driver in the Devices > Name tab;
- "Channel Red", "Channel Green", "Channel Blue", "Channel White" - names of variables (Commands), that are responsible for controlling red, green, blue and white (brightness) components of a color. Copy the names in the Device > Commands > Name tab. the names of Commands must be the same as the names of Feedbacks, where information about the current color of the RGBW strip comes.
HDL-Buspro, Domintell and other drivers of the network type have a special way to write names. The have the following format <the name of a device in the network>:<the name of a channel>, for example, "Dimmer in Bedroom:Channel 1";
- 255 - the max value of brightness for every color. Brightness is controlled in a range from 0 to 255 for most equipment, but there are drivers that control brightness in a 0...100 range (for example, HDL). Enter 100 in this setting for HDL-Buspro;
- IR.GetItem("Page 1").GetItem("Item Color Picker 1") - the name of a page ("Page 1") and an item on it ("Item Color Picker 1") that will be used as a pallete;
- IR.GetItem("Page 1").GetItem("Item Display 1") - the name of a page ("Page 1") и and and item on it ("Item Display 1") that will be used to display a color chosen on a pallete;
- IR.GetItem("Page 1").GetItem("Slider Level 1") - the name of a page ("Page 1") and item on it ("Slider Level 1") that will control the brghtness of a chosen color when the value of a level changes;
3.4 Click "OK" to save the palette description. Start the Emulator to test its work.
Errors that may occur if a palette malfunctions are displayed in the log (F4).
Operation Principles
1. When the joystick is pressed or moved, a selected color is split into 3 basic ones: red, green and blue.
For example, purple is a combination of blue and red.
2. The received values are sent to 3 channels: Red, Green, Blue, and equipment turns on the color we chose.
Тhus, light or lighting can be of any color within the color range of a palette.
3. By uniting the 3 feedback channels, the current color can be shown on a display.
Edit Box
Edit Box is an item to enter data from a keyboard. The entered data remain on the item and they can be "taken" - sent to equipment of processed by a script. An edit box is often used to enter a password or other data from a keyboard.
Item Parameters
| Type
|
Edit Box
|
| Feedback
|
Reaction to being pressed
- Momentary - an edit box is highlighted when it is focused on.
|
| Hold Time
|
A period of time (in ms.), during which a button must be held for the Hold event to work.
|
| PasswordChar
|
A symbol that visually replaced any text entered in EditBox. It is used to hide passwords. The initial text can be received from the .Text property.
|
Assigning to Equipment
An edit box can be assigned to a variable directly or via a script.
When an edit box is pressed, a command to open a keyboard is done:
- Programming > Press > «Show Keyboard [keyboard_type]».
On activation of the Enter event send data from Edit Box to an item or a driver.
Example of work:
- Press - the virtual keyboard of a smart phone (tablet) is opened
- Enter - the Edit Box item sends text as a command to a driver; closes the keyboard; clears the input area.
To delete data you entered before, write an empty string in the Edit Box:
Operation Principles
1. When the Edit Box item is pressed, it becomes active.
2. The font, its color and size can be set or the entered data can encrypted.
For example, encypting is often used for passwords.
3. A value entered in Edit Box is written it the variable when Enter is pressed on the keyboard. After a value is sent, automatic clearing of the edit box can be set or display of a message about an error.
For example, when a wrong password is entered, the edit box is erase and there appears a message: "Wrong password, try again!".
TextArea
TextArea is an item to enter text in several lines from the keyboard. It is an improved version of the Edit Box item to work with large texts. The item divides texts into lines by spaces or when Enter is pressed. Use a scroll bar for convenient navigation in the text. This item has an improved paste helper. When it is called without selection, there appear the following modes: Paste, Select, Select All. When it is called with selection, there appear the following modes: Paste, Copy, Cut. TextArea is often used for notes of editing large texts.
Item Parameters
| Type
|
TextArea
|
| Feedback
|
Reaction to being pressed
- Momentary - the textarea is highlighted when it is focused on.
|
| Hold time
|
A period of time (in ms.), which a button must be help for the Hold event to work.
|
| Repeat time
|
Frequency of repetition of the Hold event
|
| PasswordChar
|
A symbol that visually replaces all text entered in в TextArea. It is used to hide passwords. The initial text can be received from the .Text property.
|
| Tags
|
Assign a tag to the item for more convenient search in the project tree. To find the tag enter its name in the Search line of the Project panel. All graphic items to which the tag is assigned to will be displayed.
|
Assigning to Equipment
A TextArea can be assigned to a variable directly or via a script.
When a TextArea is pressed, a command to open a keyboard is done:
- Programming > Press > «Show Keyboard [keyboard_type]».
Call "paste helper" by activating the Hold event:
- Programming > Hold > Show paste helper.
Program an additional button to send text to a variable .
Example of work:
- When the TextArea item is pressed a virtual keyboard of a smartpone (tablet) is opened,
- When the "Save" button is pressed, the textarea sends text to the variable, closes the keyboard and clears the textarea.
To delete area deleted earlier, write an empty string in the TextArea:
Operation Principles
1. When the TextArea is pressed, it becomes active.
2. The font, its color and size can be set or the data can be totally encrypted.
For example, encrypting of text is often used for passwords.
3. When the left mouse button is pressed or held a paste helper window appears on the screen that helps to copy, cut or paste selected text. When it is called without selecting text, the following modes appear: Paste, Select, Select All. When it is caleld and text is selected the following modes appear: Paste, Copy, Cut.
4. The item supports the following combinations of keyboads:
- Ctrl+A - select all,
- Ctrl+C - copy the selected text to the paste helper,
- Ctrl+V - paste the text from the paste helper on an item,
- Ctrl+X - cut selected text from an item to the paster helper,
5. A value entered in the TextArea is written in the variable when a button programmed to do it is pressed in the graphic interface by the Press or Release event. After a value is sent, automatic clearing of the text field and a display of the error message can be set..
For example, when the "Save" button is pressed, text is written in the project variable and the textarea is cleared for further entries.
Virtual key
Virtual key is an item to create a custom keyboard. You can create a keyboard of any configuration in iRidium project on the basis of the virtual key.
Item Parameters
| Type
|
Virtual key
|
| Feedback
|
Reaction to being pressed:
- Momentary - for keys responsible for entering a separate symbol,
- Channel - for keys that have a capability to change the register.
To switch the keyboard layout, use a project variable, that stores a number - the current state of a key. Assign a variable “In Value” to change the register.
|
| Key Type
|
The type of a key determines its behavior:
- Normal – a key with 1 state (without register changes)
- Trigger – a key with 2 states (for example, with a change of register of a keyboard layout)
- Multistate – a key with several states (the number of states is set as required)
|
| Key Action
|
An event of a key:
- Insert Text – enter a symbol written in the text field of a key. Enter one letter or numeral in the text field and the key will send it
- Enter, Up, Down, Left, … – commands of Windows OS keyboard
|
The virtual key sends a value to the active Edit Box. If you did not create Edit Box the value will not be written anywhere.
Operation Principles
1. Each Virtual key can be set for a definite symbol or a function of a keyboard (Enter, Delete etc.).
2. When a virtual key is pressed, a selected symbol is written in the active edit box.
This principle is similar to a regular sensor keyboard based on Android or iOS, but a Virtual key allows to set the design of this keyboard to suit the design of the current project.