#!/bin/sh# Connects to localhost:4223 by default, use --host and --port to change thisuid=XYZ # Change XYZ to the UID of your Dual Button Bricklet 2.0# Handle incoming state changed callbacks
tinkerforge dispatch dual-button-v2-bricklet $uid state-changed &# Enable state changed callback
tinkerforge call dual-button-v2-bricklet $uidset-state-changed-callback-configuration trueecho"Press key to exit";read dummy
kill -- -$$# Stop callback dispatch in background
The <function> to be called can take different options depending of its
kind. All functions can take the following options:
--help shows help for the specific function and exits
Getter functions can take the following options:
--execute<command> shell command line to execute for each incoming
response (see section about output formatting
Setter functions can take the following options:
--expect-response requests response and waits for it
The --expect-response option for setter functions allows to detect
timeouts and other error conditions calls of setters as well. The device will
then send a response for this purpose. If this option is not given for a
setter function then no response is sent and errors are silently ignored,
because they cannot be detected.
Internal functions are used for maintenance tasks such as flashing a new firmware
of changing the UID of a Bricklet. These task should be performed using
Brick Viewer instead of using the internal functions directly.
Sets the bootloader mode and returns the status after the requested
mode change was instigated.
You can change from bootloader mode to firmware mode and vice versa. A change
from bootloader mode to firmware mode will only take place if the entry function,
device identifier and CRC are present and correct.
This function is used by Brick Viewer during flashing. It should not be
necessary to call it in a normal user program.
The following symbols are available for this function: