tinkerforge 2.1.23 → 2.1.24
Sign up to get free protection for your applications and to get access to all the features.
- 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 #
|
@@ -102,13 +102,11 @@ module Tinkerforge
|
|
102
102
|
send_request FUNCTION_GET_ILLUMINANCE, [], '', 4, 'L'
|
103
103
|
end
|
104
104
|
|
105
|
-
# Sets the period
|
105
|
+
# Sets the period with which the CALLBACK_ILLUMINANCE callback is triggered
|
106
106
|
# periodically. A value of 0 turns the callback off.
|
107
107
|
#
|
108
108
|
# The CALLBACK_ILLUMINANCE callback is only triggered if the illuminance has changed
|
109
109
|
# since the last triggering.
|
110
|
-
#
|
111
|
-
# The default value is 0.
|
112
110
|
def set_illuminance_callback_period(period)
|
113
111
|
send_request FUNCTION_SET_ILLUMINANCE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
114
112
|
end
|
@@ -140,7 +138,7 @@ module Tinkerforge
|
|
140
138
|
send_request FUNCTION_GET_ILLUMINANCE_CALLBACK_THRESHOLD, [], '', 9, 'k L L'
|
141
139
|
end
|
142
140
|
|
143
|
-
# Sets the period
|
141
|
+
# Sets the period with which the threshold callbacks
|
144
142
|
#
|
145
143
|
# * CALLBACK_ILLUMINANCE_REACHED,
|
146
144
|
#
|
@@ -149,8 +147,6 @@ module Tinkerforge
|
|
149
147
|
# * BrickletAmbientLightV2#set_illuminance_callback_threshold,
|
150
148
|
#
|
151
149
|
# keep being reached.
|
152
|
-
#
|
153
|
-
# The default value is 100.
|
154
150
|
def set_debounce_period(debounce)
|
155
151
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
156
152
|
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 #
|
@@ -120,7 +120,7 @@ module Tinkerforge
|
|
120
120
|
send_request FUNCTION_GET_ILLUMINANCE, [], '', 4, 'L'
|
121
121
|
end
|
122
122
|
|
123
|
-
# The period
|
123
|
+
# The period is the period with which the CALLBACK_ILLUMINANCE callback is triggered
|
124
124
|
# periodically. A value of 0 turns the callback off.
|
125
125
|
#
|
126
126
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -145,8 +145,6 @@ module Tinkerforge
|
|
145
145
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
146
146
|
#
|
147
147
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
148
|
-
#
|
149
|
-
# The default value is (0, false, 'x', 0, 0).
|
150
148
|
def set_illuminance_callback_configuration(period, value_has_to_change, option, min, max)
|
151
149
|
send_request FUNCTION_SET_ILLUMINANCE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k L L', 0, ''
|
152
150
|
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 #
|
@@ -109,8 +109,7 @@ module Tinkerforge
|
|
109
109
|
|
110
110
|
end
|
111
111
|
|
112
|
-
# Returns the voltage of the sensor. The
|
113
|
-
# between 0V and 45V. The resolution between 0 and 6V is about 2mV.
|
112
|
+
# Returns the voltage of the sensor. The resolution between 0 and 6V is about 2mV.
|
114
113
|
# Between 6 and 45V the resolution is about 10mV.
|
115
114
|
#
|
116
115
|
# If you want to get the voltage periodically, it is recommended to use the
|
@@ -121,7 +120,6 @@ module Tinkerforge
|
|
121
120
|
end
|
122
121
|
|
123
122
|
# Returns the value as read by a 12-bit analog-to-digital converter.
|
124
|
-
# The value is between 0 and 4095.
|
125
123
|
#
|
126
124
|
# .. note::
|
127
125
|
# The value returned by BrickletAnalogIn#get_voltage is averaged over several samples
|
@@ -136,13 +134,11 @@ module Tinkerforge
|
|
136
134
|
send_request FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S'
|
137
135
|
end
|
138
136
|
|
139
|
-
# Sets the period
|
137
|
+
# Sets the period with which the CALLBACK_VOLTAGE callback is triggered
|
140
138
|
# periodically. A value of 0 turns the callback off.
|
141
139
|
#
|
142
140
|
# The CALLBACK_VOLTAGE callback is only triggered if the voltage has changed since
|
143
141
|
# the last triggering.
|
144
|
-
#
|
145
|
-
# The default value is 0.
|
146
142
|
def set_voltage_callback_period(period)
|
147
143
|
send_request FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
148
144
|
end
|
@@ -152,13 +148,11 @@ module Tinkerforge
|
|
152
148
|
send_request FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD, [], '', 4, 'L'
|
153
149
|
end
|
154
150
|
|
155
|
-
# Sets the period
|
151
|
+
# Sets the period with which the CALLBACK_ANALOG_VALUE callback is triggered
|
156
152
|
# periodically. A value of 0 turns the callback off.
|
157
153
|
#
|
158
154
|
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
159
155
|
# changed since the last triggering.
|
160
|
-
#
|
161
|
-
# The default value is 0.
|
162
156
|
def set_analog_value_callback_period(period)
|
163
157
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
164
158
|
end
|
@@ -179,8 +173,6 @@ module Tinkerforge
|
|
179
173
|
# "'i'", "Callback is triggered when the voltage is *inside* the min and max values"
|
180
174
|
# "'<'", "Callback is triggered when the voltage is smaller than the min value (max is ignored)"
|
181
175
|
# "'>'", "Callback is triggered when the voltage is greater than the min value (max is ignored)"
|
182
|
-
#
|
183
|
-
# The default value is ('x', 0, 0).
|
184
176
|
def set_voltage_callback_threshold(option, min, max)
|
185
177
|
send_request FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
186
178
|
end
|
@@ -201,8 +193,6 @@ module Tinkerforge
|
|
201
193
|
# "'i'", "Callback is triggered when the analog value is *inside* the min and max values"
|
202
194
|
# "'<'", "Callback is triggered when the analog value is smaller than the min value (max is ignored)"
|
203
195
|
# "'>'", "Callback is triggered when the analog value is greater than the min value (max is ignored)"
|
204
|
-
#
|
205
|
-
# The default value is ('x', 0, 0).
|
206
196
|
def set_analog_value_callback_threshold(option, min, max)
|
207
197
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
208
198
|
end
|
@@ -212,7 +202,7 @@ module Tinkerforge
|
|
212
202
|
send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
213
203
|
end
|
214
204
|
|
215
|
-
# Sets the period
|
205
|
+
# Sets the period with which the threshold callbacks
|
216
206
|
#
|
217
207
|
# * CALLBACK_VOLTAGE_REACHED,
|
218
208
|
# * CALLBACK_ANALOG_VALUE_REACHED
|
@@ -223,8 +213,6 @@ module Tinkerforge
|
|
223
213
|
# * BrickletAnalogIn#set_analog_value_callback_threshold
|
224
214
|
#
|
225
215
|
# keep being reached.
|
226
|
-
#
|
227
|
-
# The default value is 100.
|
228
216
|
def set_debounce_period(debounce)
|
229
217
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
230
218
|
end
|
@@ -243,8 +231,6 @@ module Tinkerforge
|
|
243
231
|
# * 4: 0V - 45.00V, ~11.25mV resolution
|
244
232
|
# * 5: 0V - 3.3V, ~0.81mV resolution, new in version 2.0.3$nbsp;(Plugin)
|
245
233
|
#
|
246
|
-
# The default measurement range is 0.
|
247
|
-
#
|
248
234
|
# .. versionadded:: 2.0.1$nbsp;(Plugin)
|
249
235
|
def set_range(range)
|
250
236
|
send_request FUNCTION_SET_RANGE, [range], 'C', 0, ''
|
@@ -263,8 +249,6 @@ module Tinkerforge
|
|
263
249
|
# averaging is off, there is more noise on the data, but the data is without
|
264
250
|
# delay.
|
265
251
|
#
|
266
|
-
# The default value is 50.
|
267
|
-
#
|
268
252
|
# .. versionadded:: 2.0.3$nbsp;(Plugin)
|
269
253
|
def set_averaging(average)
|
270
254
|
send_request FUNCTION_SET_AVERAGING, [average], 'C', 0, ''
|
@@ -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 #
|
@@ -99,8 +99,7 @@ module Tinkerforge
|
|
99
99
|
|
100
100
|
end
|
101
101
|
|
102
|
-
# Returns the measured voltage. The
|
103
|
-
# between 0V and 42V. The resolution is approximately 10mV.
|
102
|
+
# Returns the measured voltage. The resolution is approximately 10mV.
|
104
103
|
#
|
105
104
|
# If you want to get the voltage periodically, it is recommended to use the
|
106
105
|
# CALLBACK_VOLTAGE callback and set the period with
|
@@ -110,7 +109,6 @@ module Tinkerforge
|
|
110
109
|
end
|
111
110
|
|
112
111
|
# Returns the value as read by a 12-bit analog-to-digital converter.
|
113
|
-
# The value is between 0 and 4095.
|
114
112
|
#
|
115
113
|
# If you want the analog value periodically, it is recommended to use the
|
116
114
|
# CALLBACK_ANALOG_VALUE callback and set the period with
|
@@ -119,13 +117,11 @@ module Tinkerforge
|
|
119
117
|
send_request FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S'
|
120
118
|
end
|
121
119
|
|
122
|
-
# Sets the period
|
120
|
+
# Sets the period with which the CALLBACK_VOLTAGE callback is triggered
|
123
121
|
# periodically. A value of 0 turns the callback off.
|
124
122
|
#
|
125
123
|
# The CALLBACK_VOLTAGE callback is only triggered if the voltage has changed since
|
126
124
|
# the last triggering.
|
127
|
-
#
|
128
|
-
# The default value is 0.
|
129
125
|
def set_voltage_callback_period(period)
|
130
126
|
send_request FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
131
127
|
end
|
@@ -135,13 +131,11 @@ module Tinkerforge
|
|
135
131
|
send_request FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD, [], '', 4, 'L'
|
136
132
|
end
|
137
133
|
|
138
|
-
# Sets the period
|
134
|
+
# Sets the period with which the CALLBACK_ANALOG_VALUE callback is triggered
|
139
135
|
# periodically. A value of 0 turns the callback off.
|
140
136
|
#
|
141
137
|
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
142
138
|
# changed since the last triggering.
|
143
|
-
#
|
144
|
-
# The default value is 0.
|
145
139
|
def set_analog_value_callback_period(period)
|
146
140
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
147
141
|
end
|
@@ -162,8 +156,6 @@ module Tinkerforge
|
|
162
156
|
# "'i'", "Callback is triggered when the voltage is *inside* the min and max values"
|
163
157
|
# "'<'", "Callback is triggered when the voltage is smaller than the min value (max is ignored)"
|
164
158
|
# "'>'", "Callback is triggered when the voltage is greater than the min value (max is ignored)"
|
165
|
-
#
|
166
|
-
# The default value is ('x', 0, 0).
|
167
159
|
def set_voltage_callback_threshold(option, min, max)
|
168
160
|
send_request FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
169
161
|
end
|
@@ -184,8 +176,6 @@ module Tinkerforge
|
|
184
176
|
# "'i'", "Callback is triggered when the analog value is *inside* the min and max values"
|
185
177
|
# "'<'", "Callback is triggered when the analog value is smaller than the min value (max is ignored)"
|
186
178
|
# "'>'", "Callback is triggered when the analog value is greater than the min value (max is ignored)"
|
187
|
-
#
|
188
|
-
# The default value is ('x', 0, 0).
|
189
179
|
def set_analog_value_callback_threshold(option, min, max)
|
190
180
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
191
181
|
end
|
@@ -195,7 +185,7 @@ module Tinkerforge
|
|
195
185
|
send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
196
186
|
end
|
197
187
|
|
198
|
-
# Sets the period
|
188
|
+
# Sets the period with which the threshold callbacks
|
199
189
|
#
|
200
190
|
# * CALLBACK_VOLTAGE_REACHED,
|
201
191
|
# * CALLBACK_ANALOG_VALUE_REACHED
|
@@ -206,8 +196,6 @@ module Tinkerforge
|
|
206
196
|
# * BrickletAnalogInV2#set_analog_value_callback_threshold
|
207
197
|
#
|
208
198
|
# keep being reached.
|
209
|
-
#
|
210
|
-
# The default value is 100.
|
211
199
|
def set_debounce_period(debounce)
|
212
200
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
213
201
|
end
|
@@ -222,10 +210,6 @@ module Tinkerforge
|
|
222
210
|
#
|
223
211
|
# Setting the length to 1 will turn the averaging off. With less
|
224
212
|
# averaging, there is more noise on the data.
|
225
|
-
#
|
226
|
-
# The range for the averaging is 1-50.
|
227
|
-
#
|
228
|
-
# The default value is 50.
|
229
213
|
def set_moving_average(average)
|
230
214
|
send_request FUNCTION_SET_MOVING_AVERAGE, [average], 'C', 0, ''
|
231
215
|
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 #
|
@@ -103,8 +103,7 @@ module Tinkerforge
|
|
103
103
|
|
104
104
|
end
|
105
105
|
|
106
|
-
# Returns the measured voltage. The
|
107
|
-
# between 0V and 42V. The resolution is approximately 10mV to 1mV
|
106
|
+
# Returns the measured voltage. The resolution is approximately 10mV to 1mV
|
108
107
|
# depending on the oversampling configuration (BrickletAnalogInV3#set_oversampling).
|
109
108
|
#
|
110
109
|
#
|
@@ -115,7 +114,7 @@ module Tinkerforge
|
|
115
114
|
send_request FUNCTION_GET_VOLTAGE, [], '', 2, 'S'
|
116
115
|
end
|
117
116
|
|
118
|
-
# The period
|
117
|
+
# The period is the period with which the CALLBACK_VOLTAGE callback is triggered
|
119
118
|
# periodically. A value of 0 turns the callback off.
|
120
119
|
#
|
121
120
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -140,8 +139,6 @@ module Tinkerforge
|
|
140
139
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
141
140
|
#
|
142
141
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
143
|
-
#
|
144
|
-
# The default value is (0, false, 'x', 0, 0).
|
145
142
|
def set_voltage_callback_configuration(period, value_has_to_change, option, min, max)
|
146
143
|
send_request FUNCTION_SET_VOLTAGE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k S S', 0, ''
|
147
144
|
end
|
@@ -163,8 +160,6 @@ module Tinkerforge
|
|
163
160
|
# With increased oversampling the noise decreases. With decreased
|
164
161
|
# oversampling the reaction time increases (changes in voltage will be
|
165
162
|
# measured faster).
|
166
|
-
#
|
167
|
-
# The default value is 4096x.
|
168
163
|
def set_oversampling(oversampling)
|
169
164
|
send_request FUNCTION_SET_OVERSAMPLING, [oversampling], 'C', 0, ''
|
170
165
|
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 #
|
@@ -42,10 +42,8 @@ module Tinkerforge
|
|
42
42
|
|
43
43
|
end
|
44
44
|
|
45
|
-
# Sets the voltage
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# The default value is 0 (with mode 1).
|
45
|
+
# Sets the voltage. Calling this function will set
|
46
|
+
# the mode to 0 (see BrickletAnalogOut#set_mode).
|
49
47
|
def set_voltage(voltage)
|
50
48
|
send_request FUNCTION_SET_VOLTAGE, [voltage], 'S', 0, ''
|
51
49
|
end
|
@@ -62,10 +60,8 @@ module Tinkerforge
|
|
62
60
|
# * 2: 100k Ohm resistor to ground
|
63
61
|
# * 3: 500k Ohm resistor to ground
|
64
62
|
#
|
65
|
-
# Setting the mode to 0 will result in an output voltage of 0. You can jump
|
63
|
+
# Setting the mode to 0 will result in an output voltage of 0 V. You can jump
|
66
64
|
# to a higher output voltage directly by calling BrickletAnalogOut#set_voltage.
|
67
|
-
#
|
68
|
-
# The default mode is 1.
|
69
65
|
def set_mode(mode)
|
70
66
|
send_request FUNCTION_SET_MODE, [mode], 'C', 0, ''
|
71
67
|
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 #
|
@@ -36,7 +36,7 @@ module Tinkerforge
|
|
36
36
|
|
37
37
|
end
|
38
38
|
|
39
|
-
# Sets the voltage
|
39
|
+
# Sets the voltage.
|
40
40
|
def set_output_voltage(voltage)
|
41
41
|
send_request FUNCTION_SET_OUTPUT_VOLTAGE, [voltage], 'S', 0, ''
|
42
42
|
end
|
@@ -46,7 +46,7 @@ module Tinkerforge
|
|
46
46
|
send_request FUNCTION_GET_OUTPUT_VOLTAGE, [], '', 2, 'S'
|
47
47
|
end
|
48
48
|
|
49
|
-
# Returns the input voltage
|
49
|
+
# Returns the input voltage.
|
50
50
|
def get_input_voltage
|
51
51
|
send_request FUNCTION_GET_INPUT_VOLTAGE, [], '', 2, 'S'
|
52
52
|
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 #
|
@@ -73,7 +73,7 @@ module Tinkerforge
|
|
73
73
|
|
74
74
|
end
|
75
75
|
|
76
|
-
# Sets the voltage
|
76
|
+
# Sets the voltage.
|
77
77
|
def set_output_voltage(voltage)
|
78
78
|
send_request FUNCTION_SET_OUTPUT_VOLTAGE, [voltage], 'S', 0, ''
|
79
79
|
end
|
@@ -83,7 +83,7 @@ module Tinkerforge
|
|
83
83
|
send_request FUNCTION_GET_OUTPUT_VOLTAGE, [], '', 2, 'S'
|
84
84
|
end
|
85
85
|
|
86
|
-
# Returns the input voltage
|
86
|
+
# Returns the input voltage.
|
87
87
|
def get_input_voltage
|
88
88
|
send_request FUNCTION_GET_INPUT_VOLTAGE, [], '', 2, 'S'
|
89
89
|
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 #
|
@@ -105,9 +105,7 @@ module Tinkerforge
|
|
105
105
|
|
106
106
|
end
|
107
107
|
|
108
|
-
# Returns the air pressure of the air pressure sensor.
|
109
|
-
# has a range of 10000 to 1200000 and is given in mbar/1000, i.e. a value
|
110
|
-
# of 1001092 means that an air pressure of 1001.092 mbar is measured.
|
108
|
+
# Returns the air pressure of the air pressure sensor.
|
111
109
|
#
|
112
110
|
# If you want to get the air pressure periodically, it is recommended to use the
|
113
111
|
# CALLBACK_AIR_PRESSURE callback and set the period with
|
@@ -116,8 +114,8 @@ module Tinkerforge
|
|
116
114
|
send_request FUNCTION_GET_AIR_PRESSURE, [], '', 4, 'l'
|
117
115
|
end
|
118
116
|
|
119
|
-
# Returns the relative altitude of the air pressure sensor. The value is
|
120
|
-
#
|
117
|
+
# Returns the relative altitude of the air pressure sensor. The value is
|
118
|
+
# calculated based on the difference between the current air pressure
|
121
119
|
# and the reference air pressure that can be set with BrickletBarometer#set_reference_air_pressure.
|
122
120
|
#
|
123
121
|
# If you want to get the altitude periodically, it is recommended to use the
|
@@ -127,13 +125,11 @@ module Tinkerforge
|
|
127
125
|
send_request FUNCTION_GET_ALTITUDE, [], '', 4, 'l'
|
128
126
|
end
|
129
127
|
|
130
|
-
# Sets the period
|
128
|
+
# Sets the period with which the CALLBACK_AIR_PRESSURE callback is triggered
|
131
129
|
# periodically. A value of 0 turns the callback off.
|
132
130
|
#
|
133
131
|
# The CALLBACK_AIR_PRESSURE callback is only triggered if the air pressure has
|
134
132
|
# changed since the last triggering.
|
135
|
-
#
|
136
|
-
# The default value is 0.
|
137
133
|
def set_air_pressure_callback_period(period)
|
138
134
|
send_request FUNCTION_SET_AIR_PRESSURE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
139
135
|
end
|
@@ -143,13 +139,11 @@ module Tinkerforge
|
|
143
139
|
send_request FUNCTION_GET_AIR_PRESSURE_CALLBACK_PERIOD, [], '', 4, 'L'
|
144
140
|
end
|
145
141
|
|
146
|
-
# Sets the period
|
142
|
+
# Sets the period with which the CALLBACK_ALTITUDE callback is triggered
|
147
143
|
# periodically. A value of 0 turns the callback off.
|
148
144
|
#
|
149
145
|
# The CALLBACK_ALTITUDE callback is only triggered if the altitude has changed since
|
150
146
|
# the last triggering.
|
151
|
-
#
|
152
|
-
# The default value is 0.
|
153
147
|
def set_altitude_callback_period(period)
|
154
148
|
send_request FUNCTION_SET_ALTITUDE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
155
149
|
end
|
@@ -170,8 +164,6 @@ module Tinkerforge
|
|
170
164
|
# "'i'", "Callback is triggered when the air pressure is *inside* the min and max values"
|
171
165
|
# "'<'", "Callback is triggered when the air pressure is smaller than the min value (max is ignored)"
|
172
166
|
# "'>'", "Callback is triggered when the air pressure is greater than the min value (max is ignored)"
|
173
|
-
#
|
174
|
-
# The default value is ('x', 0, 0).
|
175
167
|
def set_air_pressure_callback_threshold(option, min, max)
|
176
168
|
send_request FUNCTION_SET_AIR_PRESSURE_CALLBACK_THRESHOLD, [option, min, max], 'k l l', 0, ''
|
177
169
|
end
|
@@ -192,8 +184,6 @@ module Tinkerforge
|
|
192
184
|
# "'i'", "Callback is triggered when the altitude is *inside* the min and max values"
|
193
185
|
# "'<'", "Callback is triggered when the altitude is smaller than the min value (max is ignored)"
|
194
186
|
# "'>'", "Callback is triggered when the altitude is greater than the min value (max is ignored)"
|
195
|
-
#
|
196
|
-
# The default value is ('x', 0, 0).
|
197
187
|
def set_altitude_callback_threshold(option, min, max)
|
198
188
|
send_request FUNCTION_SET_ALTITUDE_CALLBACK_THRESHOLD, [option, min, max], 'k l l', 0, ''
|
199
189
|
end
|
@@ -203,7 +193,7 @@ module Tinkerforge
|
|
203
193
|
send_request FUNCTION_GET_ALTITUDE_CALLBACK_THRESHOLD, [], '', 9, 'k l l'
|
204
194
|
end
|
205
195
|
|
206
|
-
# Sets the period
|
196
|
+
# Sets the period with which the threshold callbacks
|
207
197
|
#
|
208
198
|
# * CALLBACK_AIR_PRESSURE_REACHED,
|
209
199
|
# * CALLBACK_ALTITUDE_REACHED
|
@@ -214,8 +204,6 @@ module Tinkerforge
|
|
214
204
|
# * BrickletBarometer#set_altitude_callback_threshold
|
215
205
|
#
|
216
206
|
# keep being reached.
|
217
|
-
#
|
218
|
-
# The default value is 100.
|
219
207
|
def set_debounce_period(debounce)
|
220
208
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
221
209
|
end
|
@@ -225,8 +213,7 @@ module Tinkerforge
|
|
225
213
|
send_request FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L'
|
226
214
|
end
|
227
215
|
|
228
|
-
# Sets the reference air pressure
|
229
|
-
# Valid values are between 10000 and 1200000.
|
216
|
+
# Sets the reference air pressure for the altitude calculation.
|
230
217
|
# Setting the reference to the current air pressure results in a calculated
|
231
218
|
# altitude of 0cm. Passing 0 is a shortcut for passing the current air pressure as
|
232
219
|
# reference.
|
@@ -235,15 +222,11 @@ module Tinkerforge
|
|
235
222
|
# `QNH <https://en.wikipedia.org/wiki/QNH>`__ and
|
236
223
|
# `QFE <https://en.wikipedia.org/wiki/Mean_sea_level_pressure#Mean_sea_level_pressure>`__
|
237
224
|
# used in aviation.
|
238
|
-
#
|
239
|
-
# The default value is 1013.25mbar.
|
240
225
|
def set_reference_air_pressure(air_pressure)
|
241
226
|
send_request FUNCTION_SET_REFERENCE_AIR_PRESSURE, [air_pressure], 'l', 0, ''
|
242
227
|
end
|
243
228
|
|
244
|
-
# Returns the temperature of the air pressure sensor.
|
245
|
-
# has a range of -4000 to 8500 and is given in °C/100, i.e. a value
|
246
|
-
# of 2007 means that a temperature of 20.07 °C is measured.
|
229
|
+
# Returns the temperature of the air pressure sensor.
|
247
230
|
#
|
248
231
|
# This temperature is used internally for temperature compensation of the air
|
249
232
|
# pressure measurement. It is not as accurate as the temperature measured by the
|
@@ -264,18 +247,12 @@ module Tinkerforge
|
|
264
247
|
# for the pressure. The moving average is calculated from the normal
|
265
248
|
# averages. There is no moving average for the temperature.
|
266
249
|
#
|
267
|
-
# The maximum length for the pressure average is 10, for the
|
268
|
-
# temperature average is 255 and for the moving average is 25.
|
269
|
-
#
|
270
250
|
# Setting the all three parameters to 0 will turn the averaging
|
271
251
|
# completely off. If the averaging is off, there is lots of noise
|
272
252
|
# on the data, but the data is without delay. Thus we recommend
|
273
253
|
# to turn the averaging off if the Barometer Bricklet data is
|
274
254
|
# to be used for sensor fusion with other sensors.
|
275
255
|
#
|
276
|
-
# The default values are 10 for the normal averages and 25 for the
|
277
|
-
# moving average.
|
278
|
-
#
|
279
256
|
# .. versionadded:: 2.0.1$nbsp;(Plugin)
|
280
257
|
def set_averaging(moving_average_pressure, average_pressure, average_temperature)
|
281
258
|
send_request FUNCTION_SET_AVERAGING, [moving_average_pressure, average_pressure, average_temperature], 'C C C', 0, ''
|