tinkerforge 2.1.24 → 2.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/tinkerforge/brick_dc.rb +156 -75
- data/lib/tinkerforge/brick_hat.rb +69 -31
- data/lib/tinkerforge/brick_hat_zero.rb +55 -23
- data/lib/tinkerforge/brick_imu.rb +185 -78
- data/lib/tinkerforge/brick_imu_v2.rb +209 -106
- data/lib/tinkerforge/brick_master.rb +491 -183
- data/lib/tinkerforge/brick_red.rb +197 -74
- data/lib/tinkerforge/brick_servo.rb +186 -102
- data/lib/tinkerforge/brick_silent_stepper.rb +247 -167
- data/lib/tinkerforge/brick_stepper.rb +211 -99
- data/lib/tinkerforge/bricklet_accelerometer.rb +57 -23
- data/lib/tinkerforge/bricklet_accelerometer_v2.rb +104 -54
- data/lib/tinkerforge/bricklet_air_quality.rb +116 -59
- data/lib/tinkerforge/bricklet_ambient_light.rb +50 -21
- data/lib/tinkerforge/bricklet_ambient_light_v2.rb +44 -24
- data/lib/tinkerforge/bricklet_ambient_light_v3.rb +65 -27
- data/lib/tinkerforge/bricklet_analog_in.rb +62 -25
- data/lib/tinkerforge/bricklet_analog_in_v2.rb +56 -23
- data/lib/tinkerforge/bricklet_analog_in_v3.rb +66 -25
- data/lib/tinkerforge/bricklet_analog_out.rb +22 -9
- data/lib/tinkerforge/bricklet_analog_out_v2.rb +19 -8
- data/lib/tinkerforge/bricklet_analog_out_v3.rb +53 -20
- data/lib/tinkerforge/bricklet_barometer.rb +100 -27
- data/lib/tinkerforge/bricklet_barometer_v2.rb +98 -37
- data/lib/tinkerforge/bricklet_can.rb +83 -19
- data/lib/tinkerforge/bricklet_can_v2.rb +171 -38
- data/lib/tinkerforge/bricklet_co2.rb +33 -14
- data/lib/tinkerforge/bricklet_co2_v2.rb +97 -38
- data/lib/tinkerforge/bricklet_color.rb +68 -27
- data/lib/tinkerforge/bricklet_color_v2.rb +86 -33
- data/lib/tinkerforge/bricklet_compass.rb +77 -30
- data/lib/tinkerforge/bricklet_current12.rb +57 -24
- data/lib/tinkerforge/bricklet_current25.rb +57 -24
- data/lib/tinkerforge/bricklet_dc_v2.rb +521 -0
- data/lib/tinkerforge/bricklet_distance_ir.rb +56 -23
- data/lib/tinkerforge/bricklet_distance_ir_v2.rb +82 -31
- data/lib/tinkerforge/bricklet_distance_us.rb +39 -16
- data/lib/tinkerforge/bricklet_distance_us_v2.rb +66 -25
- data/lib/tinkerforge/bricklet_dmx.rb +87 -34
- data/lib/tinkerforge/bricklet_dual_button.rb +23 -10
- data/lib/tinkerforge/bricklet_dual_button_v2.rb +63 -24
- data/lib/tinkerforge/bricklet_dual_relay.rb +26 -11
- data/lib/tinkerforge/bricklet_dust_detector.rb +39 -16
- data/lib/tinkerforge/bricklet_e_paper_296x128.rb +87 -32
- data/lib/tinkerforge/bricklet_energy_monitor.rb +72 -27
- data/lib/tinkerforge/bricklet_gps.rb +63 -26
- data/lib/tinkerforge/bricklet_gps_v2.rb +116 -47
- data/lib/tinkerforge/bricklet_hall_effect.rb +42 -23
- data/lib/tinkerforge/bricklet_hall_effect_v2.rb +70 -27
- data/lib/tinkerforge/bricklet_humidity.rb +50 -21
- data/lib/tinkerforge/bricklet_humidity_v2.rb +82 -31
- data/lib/tinkerforge/bricklet_imu_v3.rb +784 -0
- data/lib/tinkerforge/bricklet_industrial_analog_out.rb +37 -14
- data/lib/tinkerforge/bricklet_industrial_analog_out_v2.rb +80 -29
- data/lib/tinkerforge/bricklet_industrial_counter.rb +100 -39
- data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +44 -17
- data/lib/tinkerforge/bricklet_industrial_digital_in_4_v2.rb +76 -29
- data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +35 -14
- data/lib/tinkerforge/bricklet_industrial_digital_out_4_v2.rb +72 -27
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +39 -16
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma_v2.rb +79 -30
- data/lib/tinkerforge/bricklet_industrial_dual_ac_relay.rb +325 -0
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +48 -19
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in_v2.rb +137 -31
- data/lib/tinkerforge/bricklet_industrial_dual_relay.rb +60 -23
- data/lib/tinkerforge/bricklet_industrial_ptc.rb +475 -0
- data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +35 -14
- data/lib/tinkerforge/bricklet_industrial_quad_relay_v2.rb +66 -25
- data/lib/tinkerforge/bricklet_io16.rb +54 -21
- data/lib/tinkerforge/bricklet_io16_v2.rb +89 -34
- data/lib/tinkerforge/bricklet_io4.rb +54 -23
- data/lib/tinkerforge/bricklet_io4_v2.rb +95 -36
- data/lib/tinkerforge/bricklet_isolator.rb +72 -29
- data/lib/tinkerforge/bricklet_joystick.rb +58 -25
- data/lib/tinkerforge/bricklet_joystick_v2.rb +67 -26
- data/lib/tinkerforge/bricklet_laser_range_finder.rb +81 -32
- data/lib/tinkerforge/bricklet_laser_range_finder_v2.rb +95 -36
- data/lib/tinkerforge/bricklet_lcd_128x64.rb +191 -70
- data/lib/tinkerforge/bricklet_lcd_16x2.rb +44 -18
- data/lib/tinkerforge/bricklet_lcd_20x4.rb +57 -23
- data/lib/tinkerforge/bricklet_led_strip.rb +59 -22
- data/lib/tinkerforge/bricklet_led_strip_v2.rb +90 -46
- data/lib/tinkerforge/bricklet_line.rb +33 -14
- data/lib/tinkerforge/bricklet_linear_poti.rb +50 -21
- data/lib/tinkerforge/bricklet_linear_poti_v2.rb +54 -21
- data/lib/tinkerforge/bricklet_load_cell.rb +60 -23
- data/lib/tinkerforge/bricklet_load_cell_v2.rb +79 -30
- data/lib/tinkerforge/bricklet_moisture.rb +39 -16
- data/lib/tinkerforge/bricklet_motion_detector.rb +21 -10
- data/lib/tinkerforge/bricklet_motion_detector_v2.rb +61 -27
- data/lib/tinkerforge/bricklet_motorized_linear_poti.rb +70 -27
- data/lib/tinkerforge/bricklet_multi_touch.rb +30 -13
- data/lib/tinkerforge/bricklet_multi_touch_v2.rb +75 -28
- data/lib/tinkerforge/bricklet_nfc.rb +126 -62
- data/lib/tinkerforge/bricklet_nfc_rfid.rb +32 -13
- data/lib/tinkerforge/bricklet_oled_128x64.rb +28 -11
- data/lib/tinkerforge/bricklet_oled_128x64_v2.rb +65 -24
- data/lib/tinkerforge/bricklet_oled_64x48.rb +28 -11
- data/lib/tinkerforge/bricklet_one_wire.rb +65 -24
- data/lib/tinkerforge/bricklet_outdoor_weather.rb +71 -28
- data/lib/tinkerforge/bricklet_particulate_matter.rb +74 -30
- data/lib/tinkerforge/bricklet_performance_dc.rb +682 -0
- data/lib/tinkerforge/bricklet_piezo_buzzer.rb +18 -9
- data/lib/tinkerforge/bricklet_piezo_speaker.rb +21 -10
- data/lib/tinkerforge/bricklet_piezo_speaker_v2.rb +79 -42
- data/lib/tinkerforge/bricklet_ptc.rb +73 -42
- data/lib/tinkerforge/bricklet_ptc_v2.rb +94 -48
- data/lib/tinkerforge/bricklet_real_time_clock.rb +44 -33
- data/lib/tinkerforge/bricklet_real_time_clock_v2.rb +77 -44
- data/lib/tinkerforge/bricklet_remote_switch.rb +38 -29
- data/lib/tinkerforge/bricklet_remote_switch_v2.rb +86 -49
- data/lib/tinkerforge/bricklet_rgb_led.rb +17 -8
- data/lib/tinkerforge/bricklet_rgb_led_button.rb +61 -30
- data/lib/tinkerforge/bricklet_rgb_led_matrix.rb +78 -33
- data/lib/tinkerforge/bricklet_rgb_led_v2.rb +51 -20
- data/lib/tinkerforge/bricklet_rotary_encoder.rb +38 -19
- data/lib/tinkerforge/bricklet_rotary_encoder_v2.rb +59 -24
- data/lib/tinkerforge/bricklet_rotary_poti.rb +52 -28
- data/lib/tinkerforge/bricklet_rotary_poti_v2.rb +56 -23
- data/lib/tinkerforge/bricklet_rs232.rb +89 -28
- data/lib/tinkerforge/bricklet_rs232_v2.rb +117 -44
- data/lib/tinkerforge/bricklet_rs485.rb +222 -95
- data/lib/tinkerforge/bricklet_segment_display_4x7.rb +24 -14
- data/lib/tinkerforge/bricklet_segment_display_4x7_v2.rb +74 -35
- data/lib/tinkerforge/bricklet_servo_v2.rb +565 -0
- data/lib/tinkerforge/bricklet_silent_stepper_v2.rb +1024 -0
- data/lib/tinkerforge/bricklet_solid_state_relay.rb +24 -13
- data/lib/tinkerforge/bricklet_solid_state_relay_v2.rb +58 -25
- data/lib/tinkerforge/bricklet_sound_intensity.rb +34 -18
- data/lib/tinkerforge/bricklet_sound_pressure_level.rb +71 -31
- data/lib/tinkerforge/bricklet_temperature.rb +39 -16
- data/lib/tinkerforge/bricklet_temperature_ir.rb +56 -23
- data/lib/tinkerforge/bricklet_temperature_ir_v2.rb +70 -27
- data/lib/tinkerforge/bricklet_temperature_v2.rb +60 -25
- data/lib/tinkerforge/bricklet_thermal_imaging.rb +104 -44
- data/lib/tinkerforge/bricklet_thermocouple.rb +44 -24
- data/lib/tinkerforge/bricklet_thermocouple_v2.rb +64 -27
- data/lib/tinkerforge/bricklet_tilt.rb +23 -10
- data/lib/tinkerforge/bricklet_uv_light.rb +35 -18
- data/lib/tinkerforge/bricklet_uv_light_v2.rb +84 -37
- data/lib/tinkerforge/bricklet_voltage.rb +51 -28
- data/lib/tinkerforge/bricklet_voltage_current.rb +90 -73
- data/lib/tinkerforge/bricklet_voltage_current_v2.rb +89 -68
- data/lib/tinkerforge/bricklet_xmc1400_breakout.rb +79 -30
- data/lib/tinkerforge/device_display_names.rb +170 -0
- data/lib/tinkerforge/ip_connection.rb +153 -33
- data/lib/tinkerforge/version.rb +1 -1
- metadata +11 -3
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
|
2
2
|
#############################################################
|
|
3
|
-
# This file was automatically generated on
|
|
3
|
+
# This file was automatically generated on 2021-05-06. #
|
|
4
4
|
# #
|
|
5
|
-
# Ruby Bindings Version 2.1.
|
|
5
|
+
# Ruby Bindings Version 2.1.29 #
|
|
6
6
|
# #
|
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
|
9
9
|
# to the generators git repository on tinkerforge.com #
|
|
10
10
|
#############################################################
|
|
11
11
|
|
|
12
|
+
require_relative './ip_connection'
|
|
13
|
+
|
|
12
14
|
module Tinkerforge
|
|
13
15
|
# 59mm linear potentiometer
|
|
14
16
|
class BrickletLinearPotiV2 < Device
|
|
@@ -61,7 +63,7 @@ module Tinkerforge
|
|
|
61
63
|
# Creates an object with the unique device ID <tt>uid</tt> and adds it to
|
|
62
64
|
# the IP Connection <tt>ipcon</tt>.
|
|
63
65
|
def initialize(uid, ipcon)
|
|
64
|
-
super uid, ipcon
|
|
66
|
+
super uid, ipcon, DEVICE_IDENTIFIER, DEVICE_DISPLAY_NAME
|
|
65
67
|
|
|
66
68
|
@api_version = [2, 0, 0]
|
|
67
69
|
|
|
@@ -81,8 +83,9 @@ module Tinkerforge
|
|
|
81
83
|
@response_expected[FUNCTION_READ_UID] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
|
82
84
|
@response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
|
83
85
|
|
|
84
|
-
@callback_formats[CALLBACK_POSITION] = 'C'
|
|
86
|
+
@callback_formats[CALLBACK_POSITION] = [9, 'C']
|
|
85
87
|
|
|
88
|
+
@ipcon.add_device self
|
|
86
89
|
end
|
|
87
90
|
|
|
88
91
|
# Returns the position of the linear potentiometer. The value is
|
|
@@ -93,7 +96,9 @@ module Tinkerforge
|
|
|
93
96
|
# CALLBACK_POSITION callback. You can set the callback configuration
|
|
94
97
|
# with BrickletLinearPotiV2#set_position_callback_configuration.
|
|
95
98
|
def get_position
|
|
96
|
-
|
|
99
|
+
check_validity
|
|
100
|
+
|
|
101
|
+
send_request FUNCTION_GET_POSITION, [], '', 9, 'C'
|
|
97
102
|
end
|
|
98
103
|
|
|
99
104
|
# The period is the period with which the CALLBACK_POSITION callback is triggered
|
|
@@ -122,12 +127,16 @@ module Tinkerforge
|
|
|
122
127
|
#
|
|
123
128
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
|
124
129
|
def set_position_callback_configuration(period, value_has_to_change, option, min, max)
|
|
125
|
-
|
|
130
|
+
check_validity
|
|
131
|
+
|
|
132
|
+
send_request FUNCTION_SET_POSITION_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k C C', 8, ''
|
|
126
133
|
end
|
|
127
134
|
|
|
128
135
|
# Returns the callback configuration as set by BrickletLinearPotiV2#set_position_callback_configuration.
|
|
129
136
|
def get_position_callback_configuration
|
|
130
|
-
|
|
137
|
+
check_validity
|
|
138
|
+
|
|
139
|
+
send_request FUNCTION_GET_POSITION_CALLBACK_CONFIGURATION, [], '', 16, 'L ? k C C'
|
|
131
140
|
end
|
|
132
141
|
|
|
133
142
|
# Returns the error count for the communication between Brick and Bricklet.
|
|
@@ -142,7 +151,9 @@ module Tinkerforge
|
|
|
142
151
|
# The errors counts are for errors that occur on the Bricklet side. All
|
|
143
152
|
# Bricks have a similar function that returns the errors on the Brick side.
|
|
144
153
|
def get_spitfp_error_count
|
|
145
|
-
|
|
154
|
+
check_validity
|
|
155
|
+
|
|
156
|
+
send_request FUNCTION_GET_SPITFP_ERROR_COUNT, [], '', 24, 'L L L L'
|
|
146
157
|
end
|
|
147
158
|
|
|
148
159
|
# Sets the bootloader mode and returns the status after the requested
|
|
@@ -155,12 +166,16 @@ module Tinkerforge
|
|
|
155
166
|
# This function is used by Brick Viewer during flashing. It should not be
|
|
156
167
|
# necessary to call it in a normal user program.
|
|
157
168
|
def set_bootloader_mode(mode)
|
|
158
|
-
|
|
169
|
+
check_validity
|
|
170
|
+
|
|
171
|
+
send_request FUNCTION_SET_BOOTLOADER_MODE, [mode], 'C', 9, 'C'
|
|
159
172
|
end
|
|
160
173
|
|
|
161
174
|
# Returns the current bootloader mode, see BrickletLinearPotiV2#set_bootloader_mode.
|
|
162
175
|
def get_bootloader_mode
|
|
163
|
-
|
|
176
|
+
check_validity
|
|
177
|
+
|
|
178
|
+
send_request FUNCTION_GET_BOOTLOADER_MODE, [], '', 9, 'C'
|
|
164
179
|
end
|
|
165
180
|
|
|
166
181
|
# Sets the firmware pointer for BrickletLinearPotiV2#write_firmware. The pointer has
|
|
@@ -170,7 +185,9 @@ module Tinkerforge
|
|
|
170
185
|
# This function is used by Brick Viewer during flashing. It should not be
|
|
171
186
|
# necessary to call it in a normal user program.
|
|
172
187
|
def set_write_firmware_pointer(pointer)
|
|
173
|
-
|
|
188
|
+
check_validity
|
|
189
|
+
|
|
190
|
+
send_request FUNCTION_SET_WRITE_FIRMWARE_POINTER, [pointer], 'L', 8, ''
|
|
174
191
|
end
|
|
175
192
|
|
|
176
193
|
# Writes 64 Bytes of firmware at the position as written by
|
|
@@ -182,7 +199,9 @@ module Tinkerforge
|
|
|
182
199
|
# This function is used by Brick Viewer during flashing. It should not be
|
|
183
200
|
# necessary to call it in a normal user program.
|
|
184
201
|
def write_firmware(data)
|
|
185
|
-
|
|
202
|
+
check_validity
|
|
203
|
+
|
|
204
|
+
send_request FUNCTION_WRITE_FIRMWARE, [data], 'C64', 9, 'C'
|
|
186
205
|
end
|
|
187
206
|
|
|
188
207
|
# Sets the status LED configuration. By default the LED shows
|
|
@@ -193,22 +212,28 @@ module Tinkerforge
|
|
|
193
212
|
#
|
|
194
213
|
# If the Bricklet is in bootloader mode, the LED is will show heartbeat by default.
|
|
195
214
|
def set_status_led_config(config)
|
|
196
|
-
|
|
215
|
+
check_validity
|
|
216
|
+
|
|
217
|
+
send_request FUNCTION_SET_STATUS_LED_CONFIG, [config], 'C', 8, ''
|
|
197
218
|
end
|
|
198
219
|
|
|
199
220
|
# Returns the configuration as set by BrickletLinearPotiV2#set_status_led_config
|
|
200
221
|
def get_status_led_config
|
|
201
|
-
|
|
222
|
+
check_validity
|
|
223
|
+
|
|
224
|
+
send_request FUNCTION_GET_STATUS_LED_CONFIG, [], '', 9, 'C'
|
|
202
225
|
end
|
|
203
226
|
|
|
204
|
-
# Returns the temperature
|
|
227
|
+
# Returns the temperature as measured inside the microcontroller. The
|
|
205
228
|
# value returned is not the ambient temperature!
|
|
206
229
|
#
|
|
207
230
|
# The temperature is only proportional to the real temperature and it has bad
|
|
208
231
|
# accuracy. Practically it is only useful as an indicator for
|
|
209
232
|
# temperature changes.
|
|
210
233
|
def get_chip_temperature
|
|
211
|
-
|
|
234
|
+
check_validity
|
|
235
|
+
|
|
236
|
+
send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 10, 's'
|
|
212
237
|
end
|
|
213
238
|
|
|
214
239
|
# Calling this function will reset the Bricklet. All configurations
|
|
@@ -218,7 +243,9 @@ module Tinkerforge
|
|
|
218
243
|
# calling functions on the existing ones will result in
|
|
219
244
|
# undefined behavior!
|
|
220
245
|
def reset
|
|
221
|
-
|
|
246
|
+
check_validity
|
|
247
|
+
|
|
248
|
+
send_request FUNCTION_RESET, [], '', 8, ''
|
|
222
249
|
end
|
|
223
250
|
|
|
224
251
|
# Writes a new UID into flash. If you want to set a new UID
|
|
@@ -227,25 +254,31 @@ module Tinkerforge
|
|
|
227
254
|
#
|
|
228
255
|
# We recommend that you use Brick Viewer to change the UID.
|
|
229
256
|
def write_uid(uid)
|
|
230
|
-
|
|
257
|
+
check_validity
|
|
258
|
+
|
|
259
|
+
send_request FUNCTION_WRITE_UID, [uid], 'L', 8, ''
|
|
231
260
|
end
|
|
232
261
|
|
|
233
262
|
# Returns the current UID as an integer. Encode as
|
|
234
263
|
# Base58 to get the usual string version.
|
|
235
264
|
def read_uid
|
|
236
|
-
|
|
265
|
+
check_validity
|
|
266
|
+
|
|
267
|
+
send_request FUNCTION_READ_UID, [], '', 12, 'L'
|
|
237
268
|
end
|
|
238
269
|
|
|
239
270
|
# Returns the UID, the UID where the Bricklet is connected to,
|
|
240
271
|
# the position, the hardware and firmware version as well as the
|
|
241
272
|
# device identifier.
|
|
242
273
|
#
|
|
243
|
-
# The position can be 'a', 'b', 'c' or '
|
|
274
|
+
# The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port).
|
|
275
|
+
# A Bricklet connected to an :ref:`Isolator Bricklet <isolator_bricklet>` is always at
|
|
276
|
+
# position 'z'.
|
|
244
277
|
#
|
|
245
278
|
# The device identifier numbers can be found :ref:`here <device_identifier>`.
|
|
246
279
|
# |device_identifier_constant|
|
|
247
280
|
def get_identity
|
|
248
|
-
send_request FUNCTION_GET_IDENTITY, [], '',
|
|
281
|
+
send_request FUNCTION_GET_IDENTITY, [], '', 33, 'Z8 Z8 k C3 C3 S'
|
|
249
282
|
end
|
|
250
283
|
|
|
251
284
|
# Registers a callback with ID <tt>id</tt> to the block <tt>block</tt>.
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
|
2
2
|
#############################################################
|
|
3
|
-
# This file was automatically generated on
|
|
3
|
+
# This file was automatically generated on 2021-05-06. #
|
|
4
4
|
# #
|
|
5
|
-
# Ruby Bindings Version 2.1.
|
|
5
|
+
# Ruby Bindings Version 2.1.29 #
|
|
6
6
|
# #
|
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
|
9
9
|
# to the generators git repository on tinkerforge.com #
|
|
10
10
|
#############################################################
|
|
11
11
|
|
|
12
|
+
require_relative './ip_connection'
|
|
13
|
+
|
|
12
14
|
module Tinkerforge
|
|
13
15
|
# Measures weight with a load cell
|
|
14
16
|
class BrickletLoadCell < Device
|
|
@@ -63,7 +65,7 @@ module Tinkerforge
|
|
|
63
65
|
# Creates an object with the unique device ID <tt>uid</tt> and adds it to
|
|
64
66
|
# the IP Connection <tt>ipcon</tt>.
|
|
65
67
|
def initialize(uid, ipcon)
|
|
66
|
-
super uid, ipcon
|
|
68
|
+
super uid, ipcon, DEVICE_IDENTIFIER, DEVICE_DISPLAY_NAME
|
|
67
69
|
|
|
68
70
|
@api_version = [2, 0, 0]
|
|
69
71
|
|
|
@@ -85,9 +87,10 @@ module Tinkerforge
|
|
|
85
87
|
@response_expected[FUNCTION_GET_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
|
86
88
|
@response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
|
87
89
|
|
|
88
|
-
@callback_formats[CALLBACK_WEIGHT] = 'l'
|
|
89
|
-
@callback_formats[CALLBACK_WEIGHT_REACHED] = 'l'
|
|
90
|
+
@callback_formats[CALLBACK_WEIGHT] = [12, 'l']
|
|
91
|
+
@callback_formats[CALLBACK_WEIGHT_REACHED] = [12, 'l']
|
|
90
92
|
|
|
93
|
+
@ipcon.add_device self
|
|
91
94
|
end
|
|
92
95
|
|
|
93
96
|
# Returns the currently measured weight.
|
|
@@ -96,7 +99,9 @@ module Tinkerforge
|
|
|
96
99
|
# to use the CALLBACK_WEIGHT callback and set the period with
|
|
97
100
|
# BrickletLoadCell#set_weight_callback_period.
|
|
98
101
|
def get_weight
|
|
99
|
-
|
|
102
|
+
check_validity
|
|
103
|
+
|
|
104
|
+
send_request FUNCTION_GET_WEIGHT, [], '', 12, 'l'
|
|
100
105
|
end
|
|
101
106
|
|
|
102
107
|
# Sets the period with which the CALLBACK_WEIGHT callback is triggered
|
|
@@ -105,12 +110,16 @@ module Tinkerforge
|
|
|
105
110
|
# The CALLBACK_WEIGHT callback is only triggered if the weight has changed since the
|
|
106
111
|
# last triggering.
|
|
107
112
|
def set_weight_callback_period(period)
|
|
108
|
-
|
|
113
|
+
check_validity
|
|
114
|
+
|
|
115
|
+
send_request FUNCTION_SET_WEIGHT_CALLBACK_PERIOD, [period], 'L', 8, ''
|
|
109
116
|
end
|
|
110
117
|
|
|
111
118
|
# Returns the period as set by BrickletLoadCell#set_weight_callback_period.
|
|
112
119
|
def get_weight_callback_period
|
|
113
|
-
|
|
120
|
+
check_validity
|
|
121
|
+
|
|
122
|
+
send_request FUNCTION_GET_WEIGHT_CALLBACK_PERIOD, [], '', 12, 'L'
|
|
114
123
|
end
|
|
115
124
|
|
|
116
125
|
# Sets the thresholds for the CALLBACK_WEIGHT_REACHED callback.
|
|
@@ -125,12 +134,16 @@ module Tinkerforge
|
|
|
125
134
|
# "'<'", "Callback is triggered when the weight is smaller than the min value (max is ignored)"
|
|
126
135
|
# "'>'", "Callback is triggered when the weight is greater than the min value (max is ignored)"
|
|
127
136
|
def set_weight_callback_threshold(option, min, max)
|
|
128
|
-
|
|
137
|
+
check_validity
|
|
138
|
+
|
|
139
|
+
send_request FUNCTION_SET_WEIGHT_CALLBACK_THRESHOLD, [option, min, max], 'k l l', 8, ''
|
|
129
140
|
end
|
|
130
141
|
|
|
131
142
|
# Returns the threshold as set by BrickletLoadCell#set_weight_callback_threshold.
|
|
132
143
|
def get_weight_callback_threshold
|
|
133
|
-
|
|
144
|
+
check_validity
|
|
145
|
+
|
|
146
|
+
send_request FUNCTION_GET_WEIGHT_CALLBACK_THRESHOLD, [], '', 17, 'k l l'
|
|
134
147
|
end
|
|
135
148
|
|
|
136
149
|
# Sets the period with which the threshold callback
|
|
@@ -143,12 +156,16 @@ module Tinkerforge
|
|
|
143
156
|
#
|
|
144
157
|
# keeps being reached.
|
|
145
158
|
def set_debounce_period(debounce)
|
|
146
|
-
|
|
159
|
+
check_validity
|
|
160
|
+
|
|
161
|
+
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 8, ''
|
|
147
162
|
end
|
|
148
163
|
|
|
149
164
|
# Returns the debounce period as set by BrickletLoadCell#set_debounce_period.
|
|
150
165
|
def get_debounce_period
|
|
151
|
-
|
|
166
|
+
check_validity
|
|
167
|
+
|
|
168
|
+
send_request FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 12, 'L'
|
|
152
169
|
end
|
|
153
170
|
|
|
154
171
|
# Sets the length of a `moving averaging <https://en.wikipedia.org/wiki/Moving_average>`__
|
|
@@ -157,27 +174,37 @@ module Tinkerforge
|
|
|
157
174
|
# Setting the length to 1 will turn the averaging off. With less
|
|
158
175
|
# averaging, there is more noise on the data.
|
|
159
176
|
def set_moving_average(average)
|
|
160
|
-
|
|
177
|
+
check_validity
|
|
178
|
+
|
|
179
|
+
send_request FUNCTION_SET_MOVING_AVERAGE, [average], 'C', 8, ''
|
|
161
180
|
end
|
|
162
181
|
|
|
163
182
|
# Returns the length moving average as set by BrickletLoadCell#set_moving_average.
|
|
164
183
|
def get_moving_average
|
|
165
|
-
|
|
184
|
+
check_validity
|
|
185
|
+
|
|
186
|
+
send_request FUNCTION_GET_MOVING_AVERAGE, [], '', 9, 'C'
|
|
166
187
|
end
|
|
167
188
|
|
|
168
189
|
# Turns the LED on.
|
|
169
190
|
def led_on
|
|
170
|
-
|
|
191
|
+
check_validity
|
|
192
|
+
|
|
193
|
+
send_request FUNCTION_LED_ON, [], '', 8, ''
|
|
171
194
|
end
|
|
172
195
|
|
|
173
196
|
# Turns the LED off.
|
|
174
197
|
def led_off
|
|
175
|
-
|
|
198
|
+
check_validity
|
|
199
|
+
|
|
200
|
+
send_request FUNCTION_LED_OFF, [], '', 8, ''
|
|
176
201
|
end
|
|
177
202
|
|
|
178
203
|
# Returns *true* if the led is on, *false* otherwise.
|
|
179
204
|
def is_led_on
|
|
180
|
-
|
|
205
|
+
check_validity
|
|
206
|
+
|
|
207
|
+
send_request FUNCTION_IS_LED_ON, [], '', 9, '?'
|
|
181
208
|
end
|
|
182
209
|
|
|
183
210
|
# To calibrate your Load Cell Bricklet you have to
|
|
@@ -191,12 +218,16 @@ module Tinkerforge
|
|
|
191
218
|
# We recommend to use the Brick Viewer for calibration, you don't need
|
|
192
219
|
# to call this function in your source code.
|
|
193
220
|
def calibrate(weight)
|
|
194
|
-
|
|
221
|
+
check_validity
|
|
222
|
+
|
|
223
|
+
send_request FUNCTION_CALIBRATE, [weight], 'L', 8, ''
|
|
195
224
|
end
|
|
196
225
|
|
|
197
226
|
# Sets the currently measured weight as tare weight.
|
|
198
227
|
def tare
|
|
199
|
-
|
|
228
|
+
check_validity
|
|
229
|
+
|
|
230
|
+
send_request FUNCTION_TARE, [], '', 8, ''
|
|
200
231
|
end
|
|
201
232
|
|
|
202
233
|
# The measurement rate and gain are configurable.
|
|
@@ -218,24 +249,30 @@ module Tinkerforge
|
|
|
218
249
|
# We recommend to use the Brick Viewer for configuration, you don't need
|
|
219
250
|
# to call this function in your source code.
|
|
220
251
|
def set_configuration(rate, gain)
|
|
221
|
-
|
|
252
|
+
check_validity
|
|
253
|
+
|
|
254
|
+
send_request FUNCTION_SET_CONFIGURATION, [rate, gain], 'C C', 8, ''
|
|
222
255
|
end
|
|
223
256
|
|
|
224
257
|
# Returns the configuration as set by BrickletLoadCell#set_configuration.
|
|
225
258
|
def get_configuration
|
|
226
|
-
|
|
259
|
+
check_validity
|
|
260
|
+
|
|
261
|
+
send_request FUNCTION_GET_CONFIGURATION, [], '', 10, 'C C'
|
|
227
262
|
end
|
|
228
263
|
|
|
229
264
|
# Returns the UID, the UID where the Bricklet is connected to,
|
|
230
265
|
# the position, the hardware and firmware version as well as the
|
|
231
266
|
# device identifier.
|
|
232
267
|
#
|
|
233
|
-
# The position can be 'a', 'b', 'c' or '
|
|
268
|
+
# The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port).
|
|
269
|
+
# A Bricklet connected to an :ref:`Isolator Bricklet <isolator_bricklet>` is always at
|
|
270
|
+
# position 'z'.
|
|
234
271
|
#
|
|
235
272
|
# The device identifier numbers can be found :ref:`here <device_identifier>`.
|
|
236
273
|
# |device_identifier_constant|
|
|
237
274
|
def get_identity
|
|
238
|
-
send_request FUNCTION_GET_IDENTITY, [], '',
|
|
275
|
+
send_request FUNCTION_GET_IDENTITY, [], '', 33, 'Z8 Z8 k C3 C3 S'
|
|
239
276
|
end
|
|
240
277
|
|
|
241
278
|
# Registers a callback with ID <tt>id</tt> to the block <tt>block</tt>.
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
|
2
2
|
#############################################################
|
|
3
|
-
# This file was automatically generated on
|
|
3
|
+
# This file was automatically generated on 2021-05-06. #
|
|
4
4
|
# #
|
|
5
|
-
# Ruby Bindings Version 2.1.
|
|
5
|
+
# Ruby Bindings Version 2.1.29 #
|
|
6
6
|
# #
|
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
|
9
9
|
# to the generators git repository on tinkerforge.com #
|
|
10
10
|
#############################################################
|
|
11
11
|
|
|
12
|
+
require_relative './ip_connection'
|
|
13
|
+
|
|
12
14
|
module Tinkerforge
|
|
13
15
|
# Measures weight with a load cell
|
|
14
16
|
class BrickletLoadCellV2 < Device
|
|
@@ -77,7 +79,7 @@ module Tinkerforge
|
|
|
77
79
|
# Creates an object with the unique device ID <tt>uid</tt> and adds it to
|
|
78
80
|
# the IP Connection <tt>ipcon</tt>.
|
|
79
81
|
def initialize(uid, ipcon)
|
|
80
|
-
super uid, ipcon
|
|
82
|
+
super uid, ipcon, DEVICE_IDENTIFIER, DEVICE_DISPLAY_NAME
|
|
81
83
|
|
|
82
84
|
@api_version = [2, 0, 0]
|
|
83
85
|
|
|
@@ -105,18 +107,21 @@ module Tinkerforge
|
|
|
105
107
|
@response_expected[FUNCTION_READ_UID] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
|
106
108
|
@response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
|
107
109
|
|
|
108
|
-
@callback_formats[CALLBACK_WEIGHT] = 'l'
|
|
110
|
+
@callback_formats[CALLBACK_WEIGHT] = [12, 'l']
|
|
109
111
|
|
|
112
|
+
@ipcon.add_device self
|
|
110
113
|
end
|
|
111
114
|
|
|
112
|
-
# Returns the currently measured weight
|
|
115
|
+
# Returns the currently measured weight.
|
|
113
116
|
#
|
|
114
117
|
#
|
|
115
118
|
# If you want to get the value periodically, it is recommended to use the
|
|
116
119
|
# CALLBACK_WEIGHT callback. You can set the callback configuration
|
|
117
120
|
# with BrickletLoadCellV2#set_weight_callback_configuration.
|
|
118
121
|
def get_weight
|
|
119
|
-
|
|
122
|
+
check_validity
|
|
123
|
+
|
|
124
|
+
send_request FUNCTION_GET_WEIGHT, [], '', 12, 'l'
|
|
120
125
|
end
|
|
121
126
|
|
|
122
127
|
# The period is the period with which the CALLBACK_WEIGHT callback is triggered
|
|
@@ -145,12 +150,16 @@ module Tinkerforge
|
|
|
145
150
|
#
|
|
146
151
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
|
147
152
|
def set_weight_callback_configuration(period, value_has_to_change, option, min, max)
|
|
148
|
-
|
|
153
|
+
check_validity
|
|
154
|
+
|
|
155
|
+
send_request FUNCTION_SET_WEIGHT_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 8, ''
|
|
149
156
|
end
|
|
150
157
|
|
|
151
158
|
# Returns the callback configuration as set by BrickletLoadCellV2#set_weight_callback_configuration.
|
|
152
159
|
def get_weight_callback_configuration
|
|
153
|
-
|
|
160
|
+
check_validity
|
|
161
|
+
|
|
162
|
+
send_request FUNCTION_GET_WEIGHT_CALLBACK_CONFIGURATION, [], '', 22, 'L ? k l l'
|
|
154
163
|
end
|
|
155
164
|
|
|
156
165
|
# Sets the length of a `moving averaging <https://en.wikipedia.org/wiki/Moving_average>`__
|
|
@@ -159,23 +168,31 @@ module Tinkerforge
|
|
|
159
168
|
# Setting the length to 1 will turn the averaging off. With less
|
|
160
169
|
# averaging, there is more noise on the data.
|
|
161
170
|
def set_moving_average(average)
|
|
162
|
-
|
|
171
|
+
check_validity
|
|
172
|
+
|
|
173
|
+
send_request FUNCTION_SET_MOVING_AVERAGE, [average], 'S', 8, ''
|
|
163
174
|
end
|
|
164
175
|
|
|
165
176
|
# Returns the length moving average as set by BrickletLoadCellV2#set_moving_average.
|
|
166
177
|
def get_moving_average
|
|
167
|
-
|
|
178
|
+
check_validity
|
|
179
|
+
|
|
180
|
+
send_request FUNCTION_GET_MOVING_AVERAGE, [], '', 10, 'S'
|
|
168
181
|
end
|
|
169
182
|
|
|
170
183
|
# Configures the info LED to be either turned off, turned on, or blink in
|
|
171
184
|
# heartbeat mode.
|
|
172
185
|
def set_info_led_config(config)
|
|
173
|
-
|
|
186
|
+
check_validity
|
|
187
|
+
|
|
188
|
+
send_request FUNCTION_SET_INFO_LED_CONFIG, [config], 'C', 8, ''
|
|
174
189
|
end
|
|
175
190
|
|
|
176
191
|
# Returns the LED configuration as set by BrickletLoadCellV2#set_info_led_config
|
|
177
192
|
def get_info_led_config
|
|
178
|
-
|
|
193
|
+
check_validity
|
|
194
|
+
|
|
195
|
+
send_request FUNCTION_GET_INFO_LED_CONFIG, [], '', 9, 'C'
|
|
179
196
|
end
|
|
180
197
|
|
|
181
198
|
# To calibrate your Load Cell Bricklet 2.0 you have to
|
|
@@ -189,12 +206,16 @@ module Tinkerforge
|
|
|
189
206
|
# We recommend to use the Brick Viewer for calibration, you don't need
|
|
190
207
|
# to call this function in your source code.
|
|
191
208
|
def calibrate(weight)
|
|
192
|
-
|
|
209
|
+
check_validity
|
|
210
|
+
|
|
211
|
+
send_request FUNCTION_CALIBRATE, [weight], 'L', 8, ''
|
|
193
212
|
end
|
|
194
213
|
|
|
195
214
|
# Sets the currently measured weight as tare weight.
|
|
196
215
|
def tare
|
|
197
|
-
|
|
216
|
+
check_validity
|
|
217
|
+
|
|
218
|
+
send_request FUNCTION_TARE, [], '', 8, ''
|
|
198
219
|
end
|
|
199
220
|
|
|
200
221
|
# The measurement rate and gain are configurable.
|
|
@@ -210,12 +231,16 @@ module Tinkerforge
|
|
|
210
231
|
# is best). If you don't know what all of this means you should keep it at
|
|
211
232
|
# 128x, it will most likely be correct.
|
|
212
233
|
def set_configuration(rate, gain)
|
|
213
|
-
|
|
234
|
+
check_validity
|
|
235
|
+
|
|
236
|
+
send_request FUNCTION_SET_CONFIGURATION, [rate, gain], 'C C', 8, ''
|
|
214
237
|
end
|
|
215
238
|
|
|
216
239
|
# Returns the configuration as set by BrickletLoadCellV2#set_configuration.
|
|
217
240
|
def get_configuration
|
|
218
|
-
|
|
241
|
+
check_validity
|
|
242
|
+
|
|
243
|
+
send_request FUNCTION_GET_CONFIGURATION, [], '', 10, 'C C'
|
|
219
244
|
end
|
|
220
245
|
|
|
221
246
|
# Returns the error count for the communication between Brick and Bricklet.
|
|
@@ -230,7 +255,9 @@ module Tinkerforge
|
|
|
230
255
|
# The errors counts are for errors that occur on the Bricklet side. All
|
|
231
256
|
# Bricks have a similar function that returns the errors on the Brick side.
|
|
232
257
|
def get_spitfp_error_count
|
|
233
|
-
|
|
258
|
+
check_validity
|
|
259
|
+
|
|
260
|
+
send_request FUNCTION_GET_SPITFP_ERROR_COUNT, [], '', 24, 'L L L L'
|
|
234
261
|
end
|
|
235
262
|
|
|
236
263
|
# Sets the bootloader mode and returns the status after the requested
|
|
@@ -243,12 +270,16 @@ module Tinkerforge
|
|
|
243
270
|
# This function is used by Brick Viewer during flashing. It should not be
|
|
244
271
|
# necessary to call it in a normal user program.
|
|
245
272
|
def set_bootloader_mode(mode)
|
|
246
|
-
|
|
273
|
+
check_validity
|
|
274
|
+
|
|
275
|
+
send_request FUNCTION_SET_BOOTLOADER_MODE, [mode], 'C', 9, 'C'
|
|
247
276
|
end
|
|
248
277
|
|
|
249
278
|
# Returns the current bootloader mode, see BrickletLoadCellV2#set_bootloader_mode.
|
|
250
279
|
def get_bootloader_mode
|
|
251
|
-
|
|
280
|
+
check_validity
|
|
281
|
+
|
|
282
|
+
send_request FUNCTION_GET_BOOTLOADER_MODE, [], '', 9, 'C'
|
|
252
283
|
end
|
|
253
284
|
|
|
254
285
|
# Sets the firmware pointer for BrickletLoadCellV2#write_firmware. The pointer has
|
|
@@ -258,7 +289,9 @@ module Tinkerforge
|
|
|
258
289
|
# This function is used by Brick Viewer during flashing. It should not be
|
|
259
290
|
# necessary to call it in a normal user program.
|
|
260
291
|
def set_write_firmware_pointer(pointer)
|
|
261
|
-
|
|
292
|
+
check_validity
|
|
293
|
+
|
|
294
|
+
send_request FUNCTION_SET_WRITE_FIRMWARE_POINTER, [pointer], 'L', 8, ''
|
|
262
295
|
end
|
|
263
296
|
|
|
264
297
|
# Writes 64 Bytes of firmware at the position as written by
|
|
@@ -270,7 +303,9 @@ module Tinkerforge
|
|
|
270
303
|
# This function is used by Brick Viewer during flashing. It should not be
|
|
271
304
|
# necessary to call it in a normal user program.
|
|
272
305
|
def write_firmware(data)
|
|
273
|
-
|
|
306
|
+
check_validity
|
|
307
|
+
|
|
308
|
+
send_request FUNCTION_WRITE_FIRMWARE, [data], 'C64', 9, 'C'
|
|
274
309
|
end
|
|
275
310
|
|
|
276
311
|
# Sets the status LED configuration. By default the LED shows
|
|
@@ -281,22 +316,28 @@ module Tinkerforge
|
|
|
281
316
|
#
|
|
282
317
|
# If the Bricklet is in bootloader mode, the LED is will show heartbeat by default.
|
|
283
318
|
def set_status_led_config(config)
|
|
284
|
-
|
|
319
|
+
check_validity
|
|
320
|
+
|
|
321
|
+
send_request FUNCTION_SET_STATUS_LED_CONFIG, [config], 'C', 8, ''
|
|
285
322
|
end
|
|
286
323
|
|
|
287
324
|
# Returns the configuration as set by BrickletLoadCellV2#set_status_led_config
|
|
288
325
|
def get_status_led_config
|
|
289
|
-
|
|
326
|
+
check_validity
|
|
327
|
+
|
|
328
|
+
send_request FUNCTION_GET_STATUS_LED_CONFIG, [], '', 9, 'C'
|
|
290
329
|
end
|
|
291
330
|
|
|
292
|
-
# Returns the temperature
|
|
331
|
+
# Returns the temperature as measured inside the microcontroller. The
|
|
293
332
|
# value returned is not the ambient temperature!
|
|
294
333
|
#
|
|
295
334
|
# The temperature is only proportional to the real temperature and it has bad
|
|
296
335
|
# accuracy. Practically it is only useful as an indicator for
|
|
297
336
|
# temperature changes.
|
|
298
337
|
def get_chip_temperature
|
|
299
|
-
|
|
338
|
+
check_validity
|
|
339
|
+
|
|
340
|
+
send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 10, 's'
|
|
300
341
|
end
|
|
301
342
|
|
|
302
343
|
# Calling this function will reset the Bricklet. All configurations
|
|
@@ -306,7 +347,9 @@ module Tinkerforge
|
|
|
306
347
|
# calling functions on the existing ones will result in
|
|
307
348
|
# undefined behavior!
|
|
308
349
|
def reset
|
|
309
|
-
|
|
350
|
+
check_validity
|
|
351
|
+
|
|
352
|
+
send_request FUNCTION_RESET, [], '', 8, ''
|
|
310
353
|
end
|
|
311
354
|
|
|
312
355
|
# Writes a new UID into flash. If you want to set a new UID
|
|
@@ -315,25 +358,31 @@ module Tinkerforge
|
|
|
315
358
|
#
|
|
316
359
|
# We recommend that you use Brick Viewer to change the UID.
|
|
317
360
|
def write_uid(uid)
|
|
318
|
-
|
|
361
|
+
check_validity
|
|
362
|
+
|
|
363
|
+
send_request FUNCTION_WRITE_UID, [uid], 'L', 8, ''
|
|
319
364
|
end
|
|
320
365
|
|
|
321
366
|
# Returns the current UID as an integer. Encode as
|
|
322
367
|
# Base58 to get the usual string version.
|
|
323
368
|
def read_uid
|
|
324
|
-
|
|
369
|
+
check_validity
|
|
370
|
+
|
|
371
|
+
send_request FUNCTION_READ_UID, [], '', 12, 'L'
|
|
325
372
|
end
|
|
326
373
|
|
|
327
374
|
# Returns the UID, the UID where the Bricklet is connected to,
|
|
328
375
|
# the position, the hardware and firmware version as well as the
|
|
329
376
|
# device identifier.
|
|
330
377
|
#
|
|
331
|
-
# The position can be 'a', 'b', 'c' or '
|
|
378
|
+
# The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port).
|
|
379
|
+
# A Bricklet connected to an :ref:`Isolator Bricklet <isolator_bricklet>` is always at
|
|
380
|
+
# position 'z'.
|
|
332
381
|
#
|
|
333
382
|
# The device identifier numbers can be found :ref:`here <device_identifier>`.
|
|
334
383
|
# |device_identifier_constant|
|
|
335
384
|
def get_identity
|
|
336
|
-
send_request FUNCTION_GET_IDENTITY, [], '',
|
|
385
|
+
send_request FUNCTION_GET_IDENTITY, [], '', 33, 'Z8 Z8 k C3 C3 S'
|
|
337
386
|
end
|
|
338
387
|
|
|
339
388
|
# Registers a callback with ID <tt>id</tt> to the block <tt>block</tt>.
|