Menu

Actions

Actions

This Input plugin allows the creation for interactive, guided events using a series of blinking elements. A configured element or group blinks until it is clicked, followed by the next specified element or group. It is possible to link together two or more elements or groups in a series, to guide the user through a pre-established process. For example an action can be configured so that when the profile is loaded, COIN1 will begin blinking and continue until a coin is inserted, at which time, it will stop blinking and START1 will then blink until it's clicked.

This plugin also allows you to trigger an event with a button push. For example the Pause button can be configured to blink until you press it a second time.

Note about use of the GPIO on a Raspberry Pi. By Default the GPIO pins do not show in inputseeker or /dev/input/by-id. To use GPIO pins, you'll need to create a UDEV rule.

#create a UDEV rule
sudo pico /etc/udev/rules.d/20-gpio.rules

#in the file add this line: 
SUBSYSTEM=="input", SUBSYSTEMS=="input", ATTRS{name}=="gpio_keys", SYMLINK+="input/by-id/gpio-event-keyboard"
# save and close and restart, or reload the UDEV system
# this UDEV rule will create a symlink in the /dev/input/by-id directory, which can then be seen by the inputseeker app. 

Parameters

In addition to the standard input plugin parameters, the following parameters are required to use the Actions plugin

name

This should always be name="Actions"

listenEvents

A comma separated list of one ore more device IDs used in the action. You can find this information using inputseeker from the terminal, or by listing the input ls /dev/input/by-id

linkedElements

Elements and groups can be linked together, to create a flow from one element to the next in the action. Use a pipe | to separate elements & groups from each other like this: linkedElements = ELEMENT1, ELEMENT2|ELEMENT3, ELEMENT4 This example will create two linked groups with two elements each; the first element on every group will start blinking when the profile is loaded. Any unlinked element will act as a toggle switch.

speed

Controls the blink speed. VerySlow, Slow, Normal, Fast, VeryFast are acceptable values

Optional, default to true, if set to false, the element instead of blinking will stay ON.

Example

<?xml version="1.0" encoding="UTF-8"?>
<LEDSpicer
    version="1.0"
    type="Input"
    name="Actions"
    speed="Normal"
    linkedElements="P1_CREDIT,P1_START|P2_CREDIT,P2_START"
    listenEvents="usb-Ultimarc_UltraStik_Ultimarc_Ultra-Stik_Player_1_1-event-joystick,gpio-event-keyboard"
>
<!-- Example linking two elements together -->
    <map
        type="Element"
        target="P1_CREDIT"           <!-- Element name-->
        trigger="2"                                <!-- Trigger to move to the next linked element -->
                color="Blue"                      <!--Color -->
        filter="Normal"                       <!--Filter for color -->
    />
    <map
        type="Element"
        target="P1_START"               <!-- Element name-->
        trigger="6"                               <!-- Trigger to move to the next linked element-->
        color="White"                      <!-- Color-->
        filter="Normal"                  <!-- Filter for color-->
    />
    <map
        type="Element"
        target="P2_CREDIT"           <!-- Element name-->
        trigger="3"                                <!-- Trigger to move to the next linked element-->
        color="Red"                           <!-- Color-->
        filter="Normal"                       <!-- Filter for color-->
    />
    <map
        type="Element"
        target="P2_START"              <!-- Element name-->
        trigger="7"                               <!-- Trigger to move to the next linked element-->
        color="White"                       <!-- Color-->
        filter="Normal"                     <!--Filter for color-->
    />
<!-- Example single elements (not linked) -->
    <map
        type="Element"
        target="PAUSE"            <!-- Element name-->
        trigger="25"              <!-- Event code-->
        color="White"           <!-- Color-->
        filter="Normal"        <!-- Filter for color-->
    />
</LEDSpicer>

Related

Wiki: Input Plugins

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.