#!/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 send and errors are silently ignored,
because they cannot be detected.
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:
device-identifier – Type: Int, Range: [0 to 216 - 1]
Returns the UID, the UID where the Bricklet is connected to,
the position, the hardware and firmware version as well as the
The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port).
The Raspberry Pi HAT (Zero) Brick is always at position 'i' and the Bricklet
connected to an Isolator Bricklet is always as