tinkerforge 2.1.23 → 2.1.24
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 +4 -4
- data/lib/tinkerforge/brick_dc.rb +2 -2
- data/lib/tinkerforge/brick_hat.rb +45 -4
- data/lib/tinkerforge/brick_hat_zero.rb +69 -3
- data/lib/tinkerforge/brick_imu.rb +8 -10
- data/lib/tinkerforge/brick_imu_v2.rb +12 -14
- data/lib/tinkerforge/brick_master.rb +6 -14
- data/lib/tinkerforge/brick_red.rb +2 -2
- data/lib/tinkerforge/brick_servo.rb +2 -2
- data/lib/tinkerforge/brick_silent_stepper.rb +3 -3
- data/lib/tinkerforge/brick_stepper.rb +3 -3
- data/lib/tinkerforge/bricklet_accelerometer.rb +7 -16
- data/lib/tinkerforge/bricklet_accelerometer_v2.rb +18 -24
- data/lib/tinkerforge/bricklet_air_quality.rb +13 -23
- data/lib/tinkerforge/bricklet_ambient_light.rb +14 -27
- data/lib/tinkerforge/bricklet_ambient_light_v2.rb +4 -8
- data/lib/tinkerforge/bricklet_ambient_light_v3.rb +3 -5
- data/lib/tinkerforge/bricklet_analog_in.rb +6 -22
- data/lib/tinkerforge/bricklet_analog_in_v2.rb +6 -22
- data/lib/tinkerforge/bricklet_analog_in_v3.rb +4 -9
- data/lib/tinkerforge/bricklet_analog_out.rb +5 -9
- data/lib/tinkerforge/bricklet_analog_out_v2.rb +4 -4
- data/lib/tinkerforge/bricklet_analog_out_v3.rb +4 -4
- data/lib/tinkerforge/bricklet_barometer.rb +10 -33
- data/lib/tinkerforge/bricklet_barometer_v2.rb +13 -32
- data/lib/tinkerforge/bricklet_can.rb +3 -7
- data/lib/tinkerforge/bricklet_can_v2.rb +8 -40
- data/lib/tinkerforge/bricklet_co2.rb +5 -13
- data/lib/tinkerforge/bricklet_co2_v2.rb +24 -24
- data/lib/tinkerforge/bricklet_color.rb +9 -22
- data/lib/tinkerforge/bricklet_color_v2.rb +7 -16
- data/lib/tinkerforge/bricklet_compass.rb +6 -12
- data/lib/tinkerforge/bricklet_current12.rb +6 -18
- data/lib/tinkerforge/bricklet_current25.rb +6 -18
- data/lib/tinkerforge/bricklet_distance_ir.rb +6 -17
- data/lib/tinkerforge/bricklet_distance_ir_v2.rb +5 -16
- data/lib/tinkerforge/bricklet_distance_us.rb +6 -16
- data/lib/tinkerforge/bricklet_distance_us_v2.rb +4 -10
- data/lib/tinkerforge/bricklet_dmx.rb +7 -16
- data/lib/tinkerforge/bricklet_dual_button.rb +2 -4
- data/lib/tinkerforge/bricklet_dual_button_v2.rb +3 -7
- data/lib/tinkerforge/bricklet_dual_relay.rb +3 -5
- data/lib/tinkerforge/bricklet_dust_detector.rb +6 -16
- data/lib/tinkerforge/bricklet_e_paper_296x128.rb +30 -33
- data/lib/tinkerforge/bricklet_energy_monitor.rb +11 -15
- data/lib/tinkerforge/bricklet_gps.rb +11 -24
- data/lib/tinkerforge/bricklet_gps_v2.rb +10 -28
- data/lib/tinkerforge/bricklet_hall_effect.rb +3 -7
- data/lib/tinkerforge/bricklet_hall_effect_v2.rb +8 -19
- data/lib/tinkerforge/bricklet_humidity.rb +6 -19
- data/lib/tinkerforge/bricklet_humidity_v2.rb +6 -20
- data/lib/tinkerforge/bricklet_industrial_analog_out.rb +6 -6
- data/lib/tinkerforge/bricklet_industrial_analog_out_v2.rb +6 -13
- data/lib/tinkerforge/bricklet_industrial_counter.rb +4 -22
- data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +9 -9
- data/lib/tinkerforge/bricklet_industrial_digital_in_4_v2.rb +5 -13
- data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +3 -3
- data/lib/tinkerforge/bricklet_industrial_digital_out_4_v2.rb +5 -8
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +6 -15
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma_v2.rb +4 -16
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +5 -13
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in_v2.rb +4 -11
- data/lib/tinkerforge/bricklet_industrial_dual_relay.rb +5 -7
- data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +3 -3
- data/lib/tinkerforge/bricklet_industrial_quad_relay_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_io16.rb +5 -13
- data/lib/tinkerforge/bricklet_io16_v2.rb +6 -16
- data/lib/tinkerforge/bricklet_io4.rb +4 -10
- data/lib/tinkerforge/bricklet_io4_v2.rb +16 -23
- data/lib/tinkerforge/bricklet_isolator.rb +44 -11
- data/lib/tinkerforge/bricklet_joystick.rb +7 -19
- data/lib/tinkerforge/bricklet_joystick_v2.rb +6 -11
- data/lib/tinkerforge/bricklet_laser_range_finder.rb +8 -29
- data/lib/tinkerforge/bricklet_laser_range_finder_v2.rb +6 -17
- data/lib/tinkerforge/bricklet_lcd_128x64.rb +30 -63
- data/lib/tinkerforge/bricklet_lcd_16x2.rb +7 -9
- data/lib/tinkerforge/bricklet_lcd_20x4.rb +4 -8
- data/lib/tinkerforge/bricklet_led_strip.rb +12 -27
- data/lib/tinkerforge/bricklet_led_strip_v2.rb +17 -4
- data/lib/tinkerforge/bricklet_line.rb +4 -10
- data/lib/tinkerforge/bricklet_linear_poti.rb +5 -16
- data/lib/tinkerforge/bricklet_linear_poti_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_load_cell.rb +6 -19
- data/lib/tinkerforge/bricklet_load_cell_v2.rb +4 -13
- data/lib/tinkerforge/bricklet_moisture.rb +6 -16
- data/lib/tinkerforge/bricklet_motion_detector.rb +2 -2
- data/lib/tinkerforge/bricklet_motion_detector_v2.rb +3 -7
- data/lib/tinkerforge/bricklet_motorized_linear_poti.rb +3 -7
- data/lib/tinkerforge/bricklet_multi_touch.rb +2 -6
- data/lib/tinkerforge/bricklet_multi_touch_v2.rb +3 -13
- data/lib/tinkerforge/bricklet_nfc.rb +6 -20
- data/lib/tinkerforge/bricklet_nfc_rfid.rb +2 -2
- data/lib/tinkerforge/bricklet_oled_128x64.rb +4 -8
- data/lib/tinkerforge/bricklet_oled_128x64_v2.rb +12 -18
- data/lib/tinkerforge/bricklet_oled_64x48.rb +4 -8
- data/lib/tinkerforge/bricklet_one_wire.rb +2 -2
- data/lib/tinkerforge/bricklet_outdoor_weather.rb +16 -16
- data/lib/tinkerforge/bricklet_particulate_matter.rb +13 -9
- data/lib/tinkerforge/bricklet_piezo_buzzer.rb +3 -6
- data/lib/tinkerforge/bricklet_piezo_speaker.rb +3 -11
- data/lib/tinkerforge/bricklet_piezo_speaker_v2.rb +8 -18
- data/lib/tinkerforge/bricklet_ptc.rb +5 -11
- data/lib/tinkerforge/bricklet_ptc_v2.rb +4 -8
- data/lib/tinkerforge/bricklet_real_time_clock.rb +3 -5
- data/lib/tinkerforge/bricklet_real_time_clock_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_remote_switch.rb +2 -2
- data/lib/tinkerforge/bricklet_remote_switch_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_button.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_matrix.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_rotary_encoder.rb +4 -8
- data/lib/tinkerforge/bricklet_rotary_encoder_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_rotary_poti.rb +5 -11
- data/lib/tinkerforge/bricklet_rotary_poti_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_rs232.rb +2 -2
- data/lib/tinkerforge/bricklet_rs232_v2.rb +6 -5
- data/lib/tinkerforge/bricklet_rs485.rb +30 -71
- data/lib/tinkerforge/bricklet_segment_display_4x7.rb +2 -2
- data/lib/tinkerforge/bricklet_segment_display_4x7_v2.rb +3 -3
- data/lib/tinkerforge/bricklet_solid_state_relay.rb +2 -2
- data/lib/tinkerforge/bricklet_solid_state_relay_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_sound_intensity.rb +4 -8
- data/lib/tinkerforge/bricklet_sound_pressure_level.rb +8 -12
- data/lib/tinkerforge/bricklet_temperature.rb +6 -14
- data/lib/tinkerforge/bricklet_temperature_ir.rb +7 -26
- data/lib/tinkerforge/bricklet_temperature_ir_v2.rb +6 -19
- data/lib/tinkerforge/bricklet_temperature_v2.rb +4 -8
- data/lib/tinkerforge/bricklet_thermal_imaging.rb +16 -26
- data/lib/tinkerforge/bricklet_thermocouple.rb +4 -8
- data/lib/tinkerforge/bricklet_thermocouple_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_tilt.rb +2 -2
- data/lib/tinkerforge/bricklet_uv_light.rb +4 -8
- data/lib/tinkerforge/bricklet_uv_light_v2.rb +5 -11
- data/lib/tinkerforge/bricklet_voltage.rb +5 -11
- data/lib/tinkerforge/bricklet_voltage_current.rb +6 -14
- data/lib/tinkerforge/bricklet_voltage_current_v2.rb +5 -11
- data/lib/tinkerforge/bricklet_xmc1400_breakout.rb +4 -8
- data/lib/tinkerforge/ip_connection.rb +3 -0
- data/lib/tinkerforge/version.rb +1 -1
- metadata +2 -2
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -42,7 +42,7 @@ module Tinkerforge
|
|
42
42
|
|
43
43
|
# This callback is triggered periodically with the period that is set by
|
44
44
|
# BrickletColor#set_color_temperature_callback_period. The parameter is the
|
45
|
-
# color temperature
|
45
|
+
# color temperature.
|
46
46
|
#
|
47
47
|
# The CALLBACK_COLOR_TEMPERATURE callback is only triggered if the color temperature
|
48
48
|
# has changed since the last triggering.
|
@@ -119,8 +119,7 @@ module Tinkerforge
|
|
119
119
|
|
120
120
|
end
|
121
121
|
|
122
|
-
# Returns the measured color of the sensor.
|
123
|
-
# have a range of 0 to 65535.
|
122
|
+
# Returns the measured color of the sensor.
|
124
123
|
#
|
125
124
|
# The red (r), green (g), blue (b) and clear (c) colors are measured
|
126
125
|
# with four different photodiodes that are responsive at different
|
@@ -139,13 +138,11 @@ module Tinkerforge
|
|
139
138
|
send_request FUNCTION_GET_COLOR, [], '', 8, 'S S S S'
|
140
139
|
end
|
141
140
|
|
142
|
-
# Sets the period
|
141
|
+
# Sets the period with which the CALLBACK_COLOR callback is triggered
|
143
142
|
# periodically. A value of 0 turns the callback off.
|
144
143
|
#
|
145
144
|
# The CALLBACK_COLOR callback is only triggered if the color has changed since the
|
146
145
|
# last triggering.
|
147
|
-
#
|
148
|
-
# The default value is 0.
|
149
146
|
def set_color_callback_period(period)
|
150
147
|
send_request FUNCTION_SET_COLOR_CALLBACK_PERIOD, [period], 'L', 0, ''
|
151
148
|
end
|
@@ -166,8 +163,6 @@ module Tinkerforge
|
|
166
163
|
# "'i'", "Callback is triggered when the temperature is *inside* the min and max values"
|
167
164
|
# "'<'", "Callback is triggered when the temperature is smaller than the min value (max is ignored)"
|
168
165
|
# "'>'", "Callback is triggered when the temperature is greater than the min value (max is ignored)"
|
169
|
-
#
|
170
|
-
# The default value is ('x', 0, 0, 0, 0, 0, 0, 0, 0).
|
171
166
|
def set_color_callback_threshold(option, min_r, max_r, min_g, max_g, min_b, max_b, min_c, max_c)
|
172
167
|
send_request FUNCTION_SET_COLOR_CALLBACK_THRESHOLD, [option, min_r, max_r, min_g, max_g, min_b, max_b, min_c, max_c], 'k S S S S S S S S', 0, ''
|
173
168
|
end
|
@@ -177,7 +172,7 @@ module Tinkerforge
|
|
177
172
|
send_request FUNCTION_GET_COLOR_CALLBACK_THRESHOLD, [], '', 17, 'k S S S S S S S S'
|
178
173
|
end
|
179
174
|
|
180
|
-
# Sets the period
|
175
|
+
# Sets the period with which the threshold callback
|
181
176
|
#
|
182
177
|
# * CALLBACK_COLOR_REACHED
|
183
178
|
#
|
@@ -186,8 +181,6 @@ module Tinkerforge
|
|
186
181
|
# * BrickletColor#set_color_callback_threshold
|
187
182
|
#
|
188
183
|
# keeps being reached.
|
189
|
-
#
|
190
|
-
# The default value is 100.
|
191
184
|
def set_debounce_period(debounce)
|
192
185
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
193
186
|
end
|
@@ -240,8 +233,6 @@ module Tinkerforge
|
|
240
233
|
# and accuracy. With a longer integration time the values read will
|
241
234
|
# be more accurate but it will take longer time to get the conversion
|
242
235
|
# results.
|
243
|
-
#
|
244
|
-
# The default values are 60x gain and 154ms integration time.
|
245
236
|
def set_config(gain, integration_time)
|
246
237
|
send_request FUNCTION_SET_CONFIG, [gain, integration_time], 'C C', 0, ''
|
247
238
|
end
|
@@ -264,7 +255,7 @@ module Tinkerforge
|
|
264
255
|
send_request FUNCTION_GET_ILLUMINANCE, [], '', 4, 'L'
|
265
256
|
end
|
266
257
|
|
267
|
-
# Returns the color temperature
|
258
|
+
# Returns the color temperature.
|
268
259
|
#
|
269
260
|
# To get a correct color temperature measurement make sure that the color
|
270
261
|
# values themselves are not saturated. The color value (R, G or B)
|
@@ -274,13 +265,11 @@ module Tinkerforge
|
|
274
265
|
send_request FUNCTION_GET_COLOR_TEMPERATURE, [], '', 2, 'S'
|
275
266
|
end
|
276
267
|
|
277
|
-
# Sets the period
|
268
|
+
# Sets the period with which the CALLBACK_ILLUMINANCE callback is triggered
|
278
269
|
# periodically. A value of 0 turns the callback off.
|
279
270
|
#
|
280
271
|
# The CALLBACK_ILLUMINANCE callback is only triggered if the illuminance has changed
|
281
272
|
# since the last triggering.
|
282
|
-
#
|
283
|
-
# The default value is 0.
|
284
273
|
def set_illuminance_callback_period(period)
|
285
274
|
send_request FUNCTION_SET_ILLUMINANCE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
286
275
|
end
|
@@ -290,13 +279,11 @@ module Tinkerforge
|
|
290
279
|
send_request FUNCTION_GET_ILLUMINANCE_CALLBACK_PERIOD, [], '', 4, 'L'
|
291
280
|
end
|
292
281
|
|
293
|
-
# Sets the period
|
282
|
+
# Sets the period with which the CALLBACK_COLOR_TEMPERATURE callback is
|
294
283
|
# triggered periodically. A value of 0 turns the callback off.
|
295
284
|
#
|
296
285
|
# The CALLBACK_COLOR_TEMPERATURE callback is only triggered if the color temperature
|
297
286
|
# has changed since the last triggering.
|
298
|
-
#
|
299
|
-
# The default value is 0.
|
300
287
|
def set_color_temperature_callback_period(period)
|
301
288
|
send_request FUNCTION_SET_COLOR_TEMPERATURE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
302
289
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -130,8 +130,7 @@ module Tinkerforge
|
|
130
130
|
|
131
131
|
end
|
132
132
|
|
133
|
-
# Returns the measured color of the sensor.
|
134
|
-
# have a range of 0 to 65535.
|
133
|
+
# Returns the measured color of the sensor.
|
135
134
|
#
|
136
135
|
# The red (r), green (g), blue (b) and clear (c) colors are measured
|
137
136
|
# with four different photodiodes that are responsive at different
|
@@ -150,7 +149,7 @@ module Tinkerforge
|
|
150
149
|
send_request FUNCTION_GET_COLOR, [], '', 8, 'S S S S'
|
151
150
|
end
|
152
151
|
|
153
|
-
# The period
|
152
|
+
# The period is the period with which the CALLBACK_COLOR
|
154
153
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
155
154
|
#
|
156
155
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -159,8 +158,6 @@ module Tinkerforge
|
|
159
158
|
#
|
160
159
|
# If it is set to false, the callback is continuously triggered with the period,
|
161
160
|
# independent of the value.
|
162
|
-
#
|
163
|
-
# The default value is (0, false).
|
164
161
|
def set_color_callback_configuration(period, value_has_to_change)
|
165
162
|
send_request FUNCTION_SET_COLOR_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
166
163
|
end
|
@@ -189,7 +186,7 @@ module Tinkerforge
|
|
189
186
|
send_request FUNCTION_GET_ILLUMINANCE, [], '', 4, 'L'
|
190
187
|
end
|
191
188
|
|
192
|
-
# The period
|
189
|
+
# The period is the period with which the CALLBACK_ILLUMINANCE callback is triggered
|
193
190
|
# periodically. A value of 0 turns the callback off.
|
194
191
|
#
|
195
192
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -214,8 +211,6 @@ module Tinkerforge
|
|
214
211
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
215
212
|
#
|
216
213
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
217
|
-
#
|
218
|
-
# The default value is (0, false, 'x', 0, 0).
|
219
214
|
def set_illuminance_callback_configuration(period, value_has_to_change, option, min, max)
|
220
215
|
send_request FUNCTION_SET_ILLUMINANCE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k L L', 0, ''
|
221
216
|
end
|
@@ -225,7 +220,7 @@ module Tinkerforge
|
|
225
220
|
send_request FUNCTION_GET_ILLUMINANCE_CALLBACK_CONFIGURATION, [], '', 14, 'L ? k L L'
|
226
221
|
end
|
227
222
|
|
228
|
-
# Returns the color temperature
|
223
|
+
# Returns the color temperature.
|
229
224
|
#
|
230
225
|
# To get a correct color temperature measurement make sure that the color
|
231
226
|
# values themselves are not saturated. The color value (R, G or B)
|
@@ -240,7 +235,7 @@ module Tinkerforge
|
|
240
235
|
send_request FUNCTION_GET_COLOR_TEMPERATURE, [], '', 2, 'S'
|
241
236
|
end
|
242
237
|
|
243
|
-
# The period
|
238
|
+
# The period is the period with which the CALLBACK_COLOR_TEMPERATURE callback is triggered
|
244
239
|
# periodically. A value of 0 turns the callback off.
|
245
240
|
#
|
246
241
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -265,8 +260,6 @@ module Tinkerforge
|
|
265
260
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
266
261
|
#
|
267
262
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
268
|
-
#
|
269
|
-
# The default value is (0, false, 'x', 0, 0).
|
270
263
|
def set_color_temperature_callback_configuration(period, value_has_to_change, option, min, max)
|
271
264
|
send_request FUNCTION_SET_COLOR_TEMPERATURE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k S S', 0, ''
|
272
265
|
end
|
@@ -311,8 +304,6 @@ module Tinkerforge
|
|
311
304
|
# and accuracy. With a longer integration time the values read will
|
312
305
|
# be more accurate but it will take longer to get the conversion
|
313
306
|
# results.
|
314
|
-
#
|
315
|
-
# The default values are 60x gain and 154ms integration time.
|
316
307
|
def set_configuration(gain, integration_time)
|
317
308
|
send_request FUNCTION_SET_CONFIGURATION, [gain, integration_time], 'C C', 0, ''
|
318
309
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -110,7 +110,7 @@ module Tinkerforge
|
|
110
110
|
|
111
111
|
end
|
112
112
|
|
113
|
-
# Returns the heading
|
113
|
+
# Returns the heading (north = 0 degree, east = 90 degree).
|
114
114
|
#
|
115
115
|
# Alternatively you can use BrickletCompass#get_magnetic_flux_density and calculate the
|
116
116
|
# heading with ``heading = atan2(y, x) * 180 / PI``.
|
@@ -123,7 +123,7 @@ module Tinkerforge
|
|
123
123
|
send_request FUNCTION_GET_HEADING, [], '', 2, 's'
|
124
124
|
end
|
125
125
|
|
126
|
-
# The period
|
126
|
+
# The period is the period with which the CALLBACK_HEADING callback is triggered
|
127
127
|
# periodically. A value of 0 turns the callback off.
|
128
128
|
#
|
129
129
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -148,8 +148,6 @@ module Tinkerforge
|
|
148
148
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
149
149
|
#
|
150
150
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
151
|
-
#
|
152
|
-
# The default value is (0, false, 'x', 0, 0).
|
153
151
|
def set_heading_callback_configuration(period, value_has_to_change, option, min, max)
|
154
152
|
send_request FUNCTION_SET_HEADING_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k s s', 0, ''
|
155
153
|
end
|
@@ -160,7 +158,7 @@ module Tinkerforge
|
|
160
158
|
end
|
161
159
|
|
162
160
|
# Returns the `magnetic flux density (magnetic induction) <https://en.wikipedia.org/wiki/Magnetic_flux>`__
|
163
|
-
# for all three axis
|
161
|
+
# for all three axis.
|
164
162
|
#
|
165
163
|
# If you want to get the value periodically, it is recommended to use the
|
166
164
|
# CALLBACK_MAGNETIC_FLUX_DENSITY callback. You can set the callback configuration
|
@@ -169,7 +167,7 @@ module Tinkerforge
|
|
169
167
|
send_request FUNCTION_GET_MAGNETIC_FLUX_DENSITY, [], '', 12, 'l l l'
|
170
168
|
end
|
171
169
|
|
172
|
-
# The period
|
170
|
+
# The period is the period with which the CALLBACK_MAGNETIC_FLUX_DENSITY callback
|
173
171
|
# is triggered periodically. A value of 0 turns the callback off.
|
174
172
|
#
|
175
173
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -178,8 +176,6 @@ module Tinkerforge
|
|
178
176
|
#
|
179
177
|
# If it is set to false, the callback is continuously triggered with the period,
|
180
178
|
# independent of the value.
|
181
|
-
#
|
182
|
-
# The default value is (0, false).
|
183
179
|
def set_magnetic_flux_density_callback_configuration(period, value_has_to_change)
|
184
180
|
send_request FUNCTION_SET_MAGNETIC_FLUX_DENSITY_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
185
181
|
end
|
@@ -202,8 +198,6 @@ module Tinkerforge
|
|
202
198
|
# you will not get new data for a period of 20ms. We highly recommend that
|
203
199
|
# you keep the background calibration enabled and only disable it if the 20ms
|
204
200
|
# off-time is a problem in your application.
|
205
|
-
#
|
206
|
-
# Default values: Data rate of 100Hz and background calibration enabled.
|
207
201
|
def set_configuration(data_rate, background_calibration)
|
208
202
|
send_request FUNCTION_SET_CONFIGURATION, [data_rate, background_calibration], 'C ?', 0, ''
|
209
203
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -104,8 +104,7 @@ module Tinkerforge
|
|
104
104
|
|
105
105
|
end
|
106
106
|
|
107
|
-
# Returns the current of the sensor.
|
108
|
-
# and between -12500mA and 12500mA.
|
107
|
+
# Returns the current of the sensor.
|
109
108
|
#
|
110
109
|
# If you want to get the current periodically, it is recommended to use the
|
111
110
|
# CALLBACK_CURRENT callback and set the period with
|
@@ -138,7 +137,6 @@ module Tinkerforge
|
|
138
137
|
end
|
139
138
|
|
140
139
|
# Returns the value as read by a 12-bit analog-to-digital converter.
|
141
|
-
# The value is between 0 and 4095.
|
142
140
|
#
|
143
141
|
# .. note::
|
144
142
|
# The value returned by BrickletCurrent12#get_current is averaged over several samples
|
@@ -153,13 +151,11 @@ module Tinkerforge
|
|
153
151
|
send_request FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S'
|
154
152
|
end
|
155
153
|
|
156
|
-
# Sets the period
|
154
|
+
# Sets the period with which the CALLBACK_CURRENT callback is triggered
|
157
155
|
# periodically. A value of 0 turns the callback off.
|
158
156
|
#
|
159
157
|
# The CALLBACK_CURRENT callback is only triggered if the current has changed since
|
160
158
|
# the last triggering.
|
161
|
-
#
|
162
|
-
# The default value is 0.
|
163
159
|
def set_current_callback_period(period)
|
164
160
|
send_request FUNCTION_SET_CURRENT_CALLBACK_PERIOD, [period], 'L', 0, ''
|
165
161
|
end
|
@@ -169,13 +165,11 @@ module Tinkerforge
|
|
169
165
|
send_request FUNCTION_GET_CURRENT_CALLBACK_PERIOD, [], '', 4, 'L'
|
170
166
|
end
|
171
167
|
|
172
|
-
# Sets the period
|
168
|
+
# Sets the period with which the CALLBACK_ANALOG_VALUE callback is triggered
|
173
169
|
# periodically. A value of 0 turns the callback off.
|
174
170
|
#
|
175
171
|
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
176
172
|
# changed since the last triggering.
|
177
|
-
#
|
178
|
-
# The default value is 0.
|
179
173
|
def set_analog_value_callback_period(period)
|
180
174
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
181
175
|
end
|
@@ -196,8 +190,6 @@ module Tinkerforge
|
|
196
190
|
# "'i'", "Callback is triggered when the current is *inside* the min and max values"
|
197
191
|
# "'<'", "Callback is triggered when the current is smaller than the min value (max is ignored)"
|
198
192
|
# "'>'", "Callback is triggered when the current is greater than the min value (max is ignored)"
|
199
|
-
#
|
200
|
-
# The default value is ('x', 0, 0).
|
201
193
|
def set_current_callback_threshold(option, min, max)
|
202
194
|
send_request FUNCTION_SET_CURRENT_CALLBACK_THRESHOLD, [option, min, max], 'k s s', 0, ''
|
203
195
|
end
|
@@ -218,8 +210,6 @@ module Tinkerforge
|
|
218
210
|
# "'i'", "Callback is triggered when the analog value is *inside* the min and max values"
|
219
211
|
# "'<'", "Callback is triggered when the analog value is smaller than the min value (max is ignored)"
|
220
212
|
# "'>'", "Callback is triggered when the analog value is greater than the min value (max is ignored)"
|
221
|
-
#
|
222
|
-
# The default value is ('x', 0, 0).
|
223
213
|
def set_analog_value_callback_threshold(option, min, max)
|
224
214
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
225
215
|
end
|
@@ -229,7 +219,7 @@ module Tinkerforge
|
|
229
219
|
send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
230
220
|
end
|
231
221
|
|
232
|
-
# Sets the period
|
222
|
+
# Sets the period with which the threshold callbacks
|
233
223
|
#
|
234
224
|
# * CALLBACK_CURRENT_REACHED,
|
235
225
|
# * CALLBACK_ANALOG_VALUE_REACHED
|
@@ -240,8 +230,6 @@ module Tinkerforge
|
|
240
230
|
# * BrickletCurrent12#set_analog_value_callback_threshold
|
241
231
|
#
|
242
232
|
# keep being reached.
|
243
|
-
#
|
244
|
-
# The default value is 100.
|
245
233
|
def set_debounce_period(debounce)
|
246
234
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
247
235
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -104,8 +104,7 @@ module Tinkerforge
|
|
104
104
|
|
105
105
|
end
|
106
106
|
|
107
|
-
# Returns the current of the sensor.
|
108
|
-
# and between -25000mA and 25000mA.
|
107
|
+
# Returns the current of the sensor.
|
109
108
|
#
|
110
109
|
# If you want to get the current periodically, it is recommended to use the
|
111
110
|
# CALLBACK_CURRENT callback and set the period with
|
@@ -138,7 +137,6 @@ module Tinkerforge
|
|
138
137
|
end
|
139
138
|
|
140
139
|
# Returns the value as read by a 12-bit analog-to-digital converter.
|
141
|
-
# The value is between 0 and 4095.
|
142
140
|
#
|
143
141
|
# .. note::
|
144
142
|
# The value returned by BrickletCurrent25#get_current is averaged over several samples
|
@@ -153,13 +151,11 @@ module Tinkerforge
|
|
153
151
|
send_request FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S'
|
154
152
|
end
|
155
153
|
|
156
|
-
# Sets the period
|
154
|
+
# Sets the period with which the CALLBACK_CURRENT callback is triggered
|
157
155
|
# periodically. A value of 0 turns the callback off.
|
158
156
|
#
|
159
157
|
# The CALLBACK_CURRENT callback is only triggered if the current has changed since
|
160
158
|
# the last triggering.
|
161
|
-
#
|
162
|
-
# The default value is 0.
|
163
159
|
def set_current_callback_period(period)
|
164
160
|
send_request FUNCTION_SET_CURRENT_CALLBACK_PERIOD, [period], 'L', 0, ''
|
165
161
|
end
|
@@ -169,13 +165,11 @@ module Tinkerforge
|
|
169
165
|
send_request FUNCTION_GET_CURRENT_CALLBACK_PERIOD, [], '', 4, 'L'
|
170
166
|
end
|
171
167
|
|
172
|
-
# Sets the period
|
168
|
+
# Sets the period with which the CALLBACK_ANALOG_VALUE callback is triggered
|
173
169
|
# periodically. A value of 0 turns the callback off.
|
174
170
|
#
|
175
171
|
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
176
172
|
# changed since the last triggering.
|
177
|
-
#
|
178
|
-
# The default value is 0.
|
179
173
|
def set_analog_value_callback_period(period)
|
180
174
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
181
175
|
end
|
@@ -196,8 +190,6 @@ module Tinkerforge
|
|
196
190
|
# "'i'", "Callback is triggered when the current is *inside* the min and max values"
|
197
191
|
# "'<'", "Callback is triggered when the current is smaller than the min value (max is ignored)"
|
198
192
|
# "'>'", "Callback is triggered when the current is greater than the min value (max is ignored)"
|
199
|
-
#
|
200
|
-
# The default value is ('x', 0, 0).
|
201
193
|
def set_current_callback_threshold(option, min, max)
|
202
194
|
send_request FUNCTION_SET_CURRENT_CALLBACK_THRESHOLD, [option, min, max], 'k s s', 0, ''
|
203
195
|
end
|
@@ -218,8 +210,6 @@ module Tinkerforge
|
|
218
210
|
# "'i'", "Callback is triggered when the analog value is *inside* the min and max values"
|
219
211
|
# "'<'", "Callback is triggered when the analog value is smaller than the min value (max is ignored)"
|
220
212
|
# "'>'", "Callback is triggered when the analog value is greater than the min value (max is ignored)"
|
221
|
-
#
|
222
|
-
# The default value is ('x', 0, 0).
|
223
213
|
def set_analog_value_callback_threshold(option, min, max)
|
224
214
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
225
215
|
end
|
@@ -229,7 +219,7 @@ module Tinkerforge
|
|
229
219
|
send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
230
220
|
end
|
231
221
|
|
232
|
-
# Sets the period
|
222
|
+
# Sets the period with which the threshold callbacks
|
233
223
|
#
|
234
224
|
# * CALLBACK_CURRENT_REACHED,
|
235
225
|
# * CALLBACK_ANALOG_VALUE_REACHED
|
@@ -240,8 +230,6 @@ module Tinkerforge
|
|
240
230
|
# * BrickletCurrent25#set_analog_value_callback_threshold
|
241
231
|
#
|
242
232
|
# keep being reached.
|
243
|
-
#
|
244
|
-
# The default value is 100.
|
245
233
|
def set_debounce_period(debounce)
|
246
234
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
247
235
|
end
|