NAME
Tinkerforge::BrickletSegmentDisplay4x7 - Four 7-segment displays with switchable colon
CONSTANTS
- DEVICE_IDENTIFIER
-
This constant is used to identify a Segment Display 4x7 Bricklet.
The get_identity() subroutine and the CALLBACK_ENUMERATE callback of the IP Connection have a device_identifier parameter to specify the Brick's or Bricklet's type.
- DEVICE_DISPLAY_NAME
-
This constant represents the display name of a Segment Display 4x7 Bricklet.
- CALLBACK_COUNTER_FINISHED
-
This constant is used with the register_callback() subroutine to specify the CALLBACK_COUNTER_FINISHED callback.
- FUNCTION_SET_SEGMENTS
-
This constant is used with the get_response_expected(), set_response_expected() and set_response_expected_all() subroutines.
- FUNCTION_GET_SEGMENTS
-
This constant is used with the get_response_expected(), set_response_expected() and set_response_expected_all() subroutines.
- FUNCTION_START_COUNTER
-
This constant is used with the get_response_expected(), set_response_expected() and set_response_expected_all() subroutines.
- FUNCTION_GET_COUNTER_VALUE
-
This constant is used with the get_response_expected(), set_response_expected() and set_response_expected_all() subroutines.
- FUNCTION_GET_IDENTITY
-
This constant is used with the get_response_expected(), set_response_expected() and set_response_expected_all() subroutines.
FUNCTIONS
- new()
-
Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*.
- set_segments()
-
The 7-segment display can be set with bitmaps. Every bit controls one segment:
.. image:: /Images/Bricklets/bricklet_segment_display_4x7_bit_order.png :scale: 100 % :alt: Bit order of one segment :align: center
For example to set a "5" you would want to activate segments 0, 2, 3, 5 and 6. This is represented by the number 0b01101101 = 0x6d = 109.
The brightness can be set between 0 (dark) and 7 (bright). The colon parameter turns the colon of the display on or off.
- get_segments()
-
Returns the segment, brightness and color data as set by :func:`SetSegments`.
- start_counter()
-
Starts a counter with the *from* value that counts to the *to* value with the each step incremented by *increment*. The *length* of the increment is given in ms.
Example: If you set *from* to 0, *to* to 100, *increment* to 1 and *length* to 1000, a counter that goes from 0 to 100 with one second pause between each increment will be started.
The maximum values for *from*, *to* and *increment* is 9999, the minimum value is -999.
Using a negative increment allows to count backwards.
You can stop the counter at every time by calling :func:`SetSegments`.
- get_counter_value()
-
Returns the counter value that is currently shown on the display.
If there is no counter running a 0 will be returned.
- get_identity()
-
Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier.
The position can be 'a', 'b', 'c' or 'd'.
The device identifier numbers can be found :ref:`here <device_identifier>`. |device_identifier_constant|