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 #
|
@@ -95,8 +95,6 @@ module Tinkerforge
|
|
95
95
|
#
|
96
96
|
# If you don't know what any of this means, just leave it at default. The
|
97
97
|
# default configuration is very likely OK for you.
|
98
|
-
#
|
99
|
-
# Default values: 0 (edge type) and 100ms (debounce time)
|
100
98
|
def set_edge_count_config(edge_type, debounce)
|
101
99
|
send_request FUNCTION_SET_EDGE_COUNT_CONFIG, [edge_type, debounce], 'C C', 0, ''
|
102
100
|
end
|
@@ -122,13 +120,11 @@ module Tinkerforge
|
|
122
120
|
send_request FUNCTION_GET_EDGE_INTERRUPT, [], '', 4, 'L'
|
123
121
|
end
|
124
122
|
|
125
|
-
# Sets the period
|
123
|
+
# Sets the period with which the CALLBACK_EDGE_COUNT callback is triggered
|
126
124
|
# periodically. A value of 0 turns the callback off.
|
127
125
|
#
|
128
126
|
# The CALLBACK_EDGE_COUNT callback is only triggered if the edge count has changed
|
129
127
|
# since the last triggering.
|
130
|
-
#
|
131
|
-
# The default value is 0.
|
132
128
|
def set_edge_count_callback_period(period)
|
133
129
|
send_request FUNCTION_SET_EDGE_COUNT_CALLBACK_PERIOD, [period], 'L', 0, ''
|
134
130
|
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 #
|
@@ -102,8 +102,7 @@ module Tinkerforge
|
|
102
102
|
|
103
103
|
end
|
104
104
|
|
105
|
-
# Returns the `magnetic flux density (magnetic induction) <https://en.wikipedia.org/wiki/Magnetic_flux>`__
|
106
|
-
# in `µT (micro Tesla) <https://en.wikipedia.org/wiki/Tesla_(unit)>`__.
|
105
|
+
# Returns the `magnetic flux density (magnetic induction) <https://en.wikipedia.org/wiki/Magnetic_flux>`__.
|
107
106
|
#
|
108
107
|
#
|
109
108
|
# If you want to get the value periodically, it is recommended to use the
|
@@ -113,7 +112,7 @@ module Tinkerforge
|
|
113
112
|
send_request FUNCTION_GET_MAGNETIC_FLUX_DENSITY, [], '', 2, 's'
|
114
113
|
end
|
115
114
|
|
116
|
-
# The period
|
115
|
+
# The period is the period with which the CALLBACK_MAGNETIC_FLUX_DENSITY callback is triggered
|
117
116
|
# periodically. A value of 0 turns the callback off.
|
118
117
|
#
|
119
118
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -138,8 +137,6 @@ module Tinkerforge
|
|
138
137
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
139
138
|
#
|
140
139
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
141
|
-
#
|
142
|
-
# The default value is (0, false, 'x', 0, 0).
|
143
140
|
def set_magnetic_flux_density_callback_configuration(period, value_has_to_change, option, min, max)
|
144
141
|
send_request FUNCTION_SET_MAGNETIC_FLUX_DENSITY_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k s s', 0, ''
|
145
142
|
end
|
@@ -151,8 +148,8 @@ module Tinkerforge
|
|
151
148
|
|
152
149
|
# Returns the current value of the counter.
|
153
150
|
#
|
154
|
-
# You can configure the low/high thresholds
|
155
|
-
#
|
151
|
+
# You can configure the low/high thresholds and the debounce time
|
152
|
+
# with BrickletHallEffectV2#set_counter_config.
|
156
153
|
#
|
157
154
|
# If you set reset counter to *true*, the count is set back to 0
|
158
155
|
# directly after it is read.
|
@@ -164,18 +161,12 @@ module Tinkerforge
|
|
164
161
|
send_request FUNCTION_GET_COUNTER, [reset_counter], '?', 4, 'L'
|
165
162
|
end
|
166
163
|
|
167
|
-
# Sets a high and a low threshold
|
164
|
+
# Sets a high and a low threshold as well as a debounce time.
|
168
165
|
#
|
169
166
|
# If the measured magnetic flux density goes above the high threshold or
|
170
167
|
# below the low threshold, the count of the counter is increased by 1.
|
171
168
|
#
|
172
169
|
# The debounce time is the minimum time between two count increments.
|
173
|
-
#
|
174
|
-
# The default values are
|
175
|
-
#
|
176
|
-
# * High Threshold: 2000µT
|
177
|
-
# * Low Threshold: -2000µT
|
178
|
-
# * Debounce: 100000µs (100ms)
|
179
170
|
def set_counter_config(high_threshold, low_threshold, debounce)
|
180
171
|
send_request FUNCTION_SET_COUNTER_CONFIG, [high_threshold, low_threshold, debounce], 's s L', 0, ''
|
181
172
|
end
|
@@ -185,7 +176,7 @@ module Tinkerforge
|
|
185
176
|
send_request FUNCTION_GET_COUNTER_CONFIG, [], '', 8, 's s L'
|
186
177
|
end
|
187
178
|
|
188
|
-
# The period
|
179
|
+
# The period is the period with which the CALLBACK_COUNTER
|
189
180
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
190
181
|
#
|
191
182
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -194,8 +185,6 @@ module Tinkerforge
|
|
194
185
|
#
|
195
186
|
# If it is set to false, the callback is continuously triggered with the period,
|
196
187
|
# independent of the value.
|
197
|
-
#
|
198
|
-
# The default value is (0, false).
|
199
188
|
def set_counter_callback_configuration(period, value_has_to_change)
|
200
189
|
send_request FUNCTION_SET_COUNTER_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
201
190
|
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 #
|
@@ -95,9 +95,7 @@ module Tinkerforge
|
|
95
95
|
|
96
96
|
end
|
97
97
|
|
98
|
-
# Returns the humidity of the sensor.
|
99
|
-
# has a range of 0 to 1000 and is given in %RH/10 (Relative Humidity),
|
100
|
-
# i.e. a value of 421 means that a humidity of 42.1 %RH is measured.
|
98
|
+
# Returns the humidity of the sensor.
|
101
99
|
#
|
102
100
|
# If you want to get the humidity periodically, it is recommended to use the
|
103
101
|
# CALLBACK_HUMIDITY callback and set the period with
|
@@ -107,7 +105,6 @@ module Tinkerforge
|
|
107
105
|
end
|
108
106
|
|
109
107
|
# Returns the value as read by a 12-bit analog-to-digital converter.
|
110
|
-
# The value is between 0 and 4095.
|
111
108
|
#
|
112
109
|
# .. note::
|
113
110
|
# The value returned by BrickletHumidity#get_humidity is averaged over several samples
|
@@ -125,13 +122,11 @@ module Tinkerforge
|
|
125
122
|
send_request FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S'
|
126
123
|
end
|
127
124
|
|
128
|
-
# Sets the period
|
125
|
+
# Sets the period with which the CALLBACK_HUMIDITY callback is triggered
|
129
126
|
# periodically. A value of 0 turns the callback off.
|
130
127
|
#
|
131
128
|
# The CALLBACK_HUMIDITY callback is only triggered if the humidity has changed
|
132
129
|
# since the last triggering.
|
133
|
-
#
|
134
|
-
# The default value is 0.
|
135
130
|
def set_humidity_callback_period(period)
|
136
131
|
send_request FUNCTION_SET_HUMIDITY_CALLBACK_PERIOD, [period], 'L', 0, ''
|
137
132
|
end
|
@@ -141,13 +136,11 @@ module Tinkerforge
|
|
141
136
|
send_request FUNCTION_GET_HUMIDITY_CALLBACK_PERIOD, [], '', 4, 'L'
|
142
137
|
end
|
143
138
|
|
144
|
-
# Sets the period
|
139
|
+
# Sets the period with which the CALLBACK_ANALOG_VALUE callback is triggered
|
145
140
|
# periodically. A value of 0 turns the callback off.
|
146
141
|
#
|
147
142
|
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
148
143
|
# changed since the last triggering.
|
149
|
-
#
|
150
|
-
# The default value is 0.
|
151
144
|
def set_analog_value_callback_period(period)
|
152
145
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
153
146
|
end
|
@@ -168,8 +161,6 @@ module Tinkerforge
|
|
168
161
|
# "'i'", "Callback is triggered when the humidity is *inside* the min and max values"
|
169
162
|
# "'<'", "Callback is triggered when the humidity is smaller than the min value (max is ignored)"
|
170
163
|
# "'>'", "Callback is triggered when the humidity is greater than the min value (max is ignored)"
|
171
|
-
#
|
172
|
-
# The default value is ('x', 0, 0).
|
173
164
|
def set_humidity_callback_threshold(option, min, max)
|
174
165
|
send_request FUNCTION_SET_HUMIDITY_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
175
166
|
end
|
@@ -190,8 +181,6 @@ module Tinkerforge
|
|
190
181
|
# "'i'", "Callback is triggered when the analog value is *inside* the min and max values"
|
191
182
|
# "'<'", "Callback is triggered when the analog value is smaller than the min value (max is ignored)"
|
192
183
|
# "'>'", "Callback is triggered when the analog value is greater than the min value (max is ignored)"
|
193
|
-
#
|
194
|
-
# The default value is ('x', 0, 0).
|
195
184
|
def set_analog_value_callback_threshold(option, min, max)
|
196
185
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
197
186
|
end
|
@@ -201,7 +190,7 @@ module Tinkerforge
|
|
201
190
|
send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
202
191
|
end
|
203
192
|
|
204
|
-
# Sets the period
|
193
|
+
# Sets the period with which the threshold callbacks
|
205
194
|
#
|
206
195
|
# * CALLBACK_HUMIDITY_REACHED,
|
207
196
|
# * CALLBACK_ANALOG_VALUE_REACHED
|
@@ -212,8 +201,6 @@ module Tinkerforge
|
|
212
201
|
# * BrickletHumidity#set_analog_value_callback_threshold
|
213
202
|
#
|
214
203
|
# keep being reached.
|
215
|
-
#
|
216
|
-
# The default value is 100.
|
217
204
|
def set_debounce_period(debounce)
|
218
205
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
219
206
|
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 #
|
@@ -118,9 +118,7 @@ module Tinkerforge
|
|
118
118
|
|
119
119
|
end
|
120
120
|
|
121
|
-
# Returns the humidity measured by the sensor.
|
122
|
-
# has a range of 0 to 10000 and is given in %RH/100 (Relative Humidity),
|
123
|
-
# i.e. a value of 4223 means that a humidity of 42.23 %RH is measured.
|
121
|
+
# Returns the humidity measured by the sensor.
|
124
122
|
#
|
125
123
|
#
|
126
124
|
# If you want to get the value periodically, it is recommended to use the
|
@@ -130,7 +128,7 @@ module Tinkerforge
|
|
130
128
|
send_request FUNCTION_GET_HUMIDITY, [], '', 2, 'S'
|
131
129
|
end
|
132
130
|
|
133
|
-
# The period
|
131
|
+
# The period is the period with which the CALLBACK_HUMIDITY callback is triggered
|
134
132
|
# periodically. A value of 0 turns the callback off.
|
135
133
|
#
|
136
134
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -155,8 +153,6 @@ module Tinkerforge
|
|
155
153
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
156
154
|
#
|
157
155
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
158
|
-
#
|
159
|
-
# The default value is (0, false, 'x', 0, 0).
|
160
156
|
def set_humidity_callback_configuration(period, value_has_to_change, option, min, max)
|
161
157
|
send_request FUNCTION_SET_HUMIDITY_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k S S', 0, ''
|
162
158
|
end
|
@@ -166,9 +162,7 @@ module Tinkerforge
|
|
166
162
|
send_request FUNCTION_GET_HUMIDITY_CALLBACK_CONFIGURATION, [], '', 10, 'L ? k S S'
|
167
163
|
end
|
168
164
|
|
169
|
-
# Returns the temperature measured by the sensor.
|
170
|
-
# has a range of -4000 to 16500 and is given in °C/100,
|
171
|
-
# i.e. a value of 3200 means that a temperature of 32.00 °C is measured.
|
165
|
+
# Returns the temperature measured by the sensor.
|
172
166
|
#
|
173
167
|
#
|
174
168
|
# If you want to get the value periodically, it is recommended to use the
|
@@ -178,7 +172,7 @@ module Tinkerforge
|
|
178
172
|
send_request FUNCTION_GET_TEMPERATURE, [], '', 2, 's'
|
179
173
|
end
|
180
174
|
|
181
|
-
# The period
|
175
|
+
# The period is the period with which the CALLBACK_TEMPERATURE callback is triggered
|
182
176
|
# periodically. A value of 0 turns the callback off.
|
183
177
|
#
|
184
178
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -203,8 +197,6 @@ module Tinkerforge
|
|
203
197
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
204
198
|
#
|
205
199
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
206
|
-
#
|
207
|
-
# The default value is (0, false, 'x', 0, 0).
|
208
200
|
def set_temperature_callback_configuration(period, value_has_to_change, option, min, max)
|
209
201
|
send_request FUNCTION_SET_TEMPERATURE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k s s', 0, ''
|
210
202
|
end
|
@@ -216,8 +208,6 @@ module Tinkerforge
|
|
216
208
|
|
217
209
|
# Enables/disables the heater. The heater can be used to dry the sensor in
|
218
210
|
# extremely wet conditions.
|
219
|
-
#
|
220
|
-
# By default the heater is disabled.
|
221
211
|
def set_heater_configuration(heater_config)
|
222
212
|
send_request FUNCTION_SET_HEATER_CONFIGURATION, [heater_config], 'C', 0, ''
|
223
213
|
end
|
@@ -233,14 +223,10 @@ module Tinkerforge
|
|
233
223
|
# Setting the length to 1 will turn the averaging off. With less
|
234
224
|
# averaging, there is more noise on the data.
|
235
225
|
#
|
236
|
-
# The range for the averaging is 1-1000.
|
237
|
-
#
|
238
226
|
# New data is gathered every 50ms*. With a moving average of length 1000 the resulting
|
239
227
|
# averaging window has a length of 50s. If you want to do long term measurements the longest
|
240
228
|
# moving average will give the cleanest results.
|
241
229
|
#
|
242
|
-
# The default value is 5.
|
243
|
-
#
|
244
230
|
# \* In firmware version 2.0.3 we added the BrickletHumidityV2#set_samples_per_second function. It
|
245
231
|
# configures the measurement frequency. Since high frequencies can result in self-heating
|
246
232
|
# of th IC, changed the default value from 20 samples per second to 1. With 1 sample per second
|
@@ -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 #
|
@@ -72,7 +72,7 @@ module Tinkerforge
|
|
72
72
|
send_request FUNCTION_IS_ENABLED, [], '', 1, '?'
|
73
73
|
end
|
74
74
|
|
75
|
-
# Sets the output voltage
|
75
|
+
# Sets the output voltage.
|
76
76
|
#
|
77
77
|
# The output voltage and output current are linked. Changing the output voltage
|
78
78
|
# also changes the output current.
|
@@ -85,7 +85,7 @@ module Tinkerforge
|
|
85
85
|
send_request FUNCTION_GET_VOLTAGE, [], '', 2, 'S'
|
86
86
|
end
|
87
87
|
|
88
|
-
# Sets the output current
|
88
|
+
# Sets the output current.
|
89
89
|
#
|
90
90
|
# The output current and output voltage are linked. Changing the output current
|
91
91
|
# also changes the output voltage.
|
@@ -103,11 +103,11 @@ module Tinkerforge
|
|
103
103
|
# Possible voltage ranges are:
|
104
104
|
#
|
105
105
|
# * 0V to 5V
|
106
|
-
# * 0V to 10V
|
106
|
+
# * 0V to 10V
|
107
107
|
#
|
108
108
|
# Possible current ranges are:
|
109
109
|
#
|
110
|
-
# * 4mA to 20mA
|
110
|
+
# * 4mA to 20mA
|
111
111
|
# * 0mA to 20mA
|
112
112
|
# * 0mA to 24mA
|
113
113
|
#
|
@@ -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,6 @@ module Tinkerforge
|
|
103
103
|
end
|
104
104
|
|
105
105
|
# Enables/disables the output of voltage and current.
|
106
|
-
#
|
107
|
-
# The default is disabled.
|
108
106
|
def set_enabled(enabled)
|
109
107
|
send_request FUNCTION_SET_ENABLED, [enabled], '?', 0, ''
|
110
108
|
end
|
@@ -114,7 +112,7 @@ module Tinkerforge
|
|
114
112
|
send_request FUNCTION_GET_ENABLED, [], '', 1, '?'
|
115
113
|
end
|
116
114
|
|
117
|
-
# Sets the output voltage
|
115
|
+
# Sets the output voltage.
|
118
116
|
#
|
119
117
|
# The output voltage and output current are linked. Changing the output voltage
|
120
118
|
# also changes the output current.
|
@@ -127,7 +125,7 @@ module Tinkerforge
|
|
127
125
|
send_request FUNCTION_GET_VOLTAGE, [], '', 2, 'S'
|
128
126
|
end
|
129
127
|
|
130
|
-
# Sets the output current
|
128
|
+
# Sets the output current.
|
131
129
|
#
|
132
130
|
# The output current and output voltage are linked. Changing the output current
|
133
131
|
# also changes the output voltage.
|
@@ -145,11 +143,11 @@ module Tinkerforge
|
|
145
143
|
# Possible voltage ranges are:
|
146
144
|
#
|
147
145
|
# * 0V to 5V
|
148
|
-
# * 0V to 10V
|
146
|
+
# * 0V to 10V
|
149
147
|
#
|
150
148
|
# Possible current ranges are:
|
151
149
|
#
|
152
|
-
# * 4mA to 20mA
|
150
|
+
# * 4mA to 20mA
|
153
151
|
# * 0mA to 20mA
|
154
152
|
# * 0mA to 24mA
|
155
153
|
#
|
@@ -170,8 +168,6 @@ module Tinkerforge
|
|
170
168
|
# of the LED can change with the output value (voltage or current).
|
171
169
|
#
|
172
170
|
# You can configure the channel status behavior with BrickletIndustrialAnalogOutV2#set_out_led_status_config.
|
173
|
-
#
|
174
|
-
# By default the LED is configured as "Out Status"
|
175
171
|
def set_out_led_config(config)
|
176
172
|
send_request FUNCTION_SET_OUT_LED_CONFIG, [config], 'C', 0, ''
|
177
173
|
end
|
@@ -202,9 +198,6 @@ module Tinkerforge
|
|
202
198
|
# 8V and above and the brightness is linearly scaled between the values 2V and 8V.
|
203
199
|
# If the min value is greater than the max value, the LED brightness is scaled the
|
204
200
|
# other way around.
|
205
|
-
#
|
206
|
-
# By default the channel LED status config is set to intensity with min=0V and
|
207
|
-
# max=10V.
|
208
201
|
def set_out_led_status_config(min, max, config)
|
209
202
|
send_request FUNCTION_SET_OUT_LED_STATUS_CONFIG, [min, max, config], 'S S C', 0, ''
|
210
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 #
|
@@ -183,26 +183,12 @@ module Tinkerforge
|
|
183
183
|
|
184
184
|
# Returns the signal data (duty cycle, period, frequency and value) for the
|
185
185
|
# given channel.
|
186
|
-
#
|
187
|
-
# The units are:
|
188
|
-
#
|
189
|
-
# * Duty Cycle: 1/100 %
|
190
|
-
# * Period: ns
|
191
|
-
# * Frequency: mHz (1/1000 Hz)
|
192
|
-
# * Value: true = high, false = low
|
193
186
|
def get_signal_data(channel)
|
194
187
|
send_request FUNCTION_GET_SIGNAL_DATA, [channel], 'C', 15, 'S Q L ?'
|
195
188
|
end
|
196
189
|
|
197
190
|
# Returns the signal data (duty cycle, period, frequency and value) for all four
|
198
191
|
# channels.
|
199
|
-
#
|
200
|
-
# The units are:
|
201
|
-
#
|
202
|
-
# * Duty Cycle: 1/100 %
|
203
|
-
# * Period: ns
|
204
|
-
# * Frequency: mHz (1/1000 Hz)
|
205
|
-
# * Value: true = high, false = low
|
206
192
|
def get_all_signal_data
|
207
193
|
send_request FUNCTION_GET_ALL_SIGNAL_DATA, [], '', 60, 'S4 Q4 L4 ?4'
|
208
194
|
end
|
@@ -262,7 +248,7 @@ module Tinkerforge
|
|
262
248
|
send_request FUNCTION_GET_COUNTER_CONFIGURATION, [channel], 'C', 4, 'C C C C'
|
263
249
|
end
|
264
250
|
|
265
|
-
# The period
|
251
|
+
# The period is the period with which the CALLBACK_ALL_COUNTER
|
266
252
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
267
253
|
#
|
268
254
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -271,8 +257,6 @@ module Tinkerforge
|
|
271
257
|
#
|
272
258
|
# If it is set to false, the callback is continuously triggered with the period,
|
273
259
|
# independent of the value.
|
274
|
-
#
|
275
|
-
# The default value is (0, false).
|
276
260
|
def set_all_counter_callback_configuration(period, value_has_to_change)
|
277
261
|
send_request FUNCTION_SET_ALL_COUNTER_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
278
262
|
end
|
@@ -283,7 +267,7 @@ module Tinkerforge
|
|
283
267
|
send_request FUNCTION_GET_ALL_COUNTER_CALLBACK_CONFIGURATION, [], '', 5, 'L ?'
|
284
268
|
end
|
285
269
|
|
286
|
-
# The period
|
270
|
+
# The period is the period with which the CALLBACK_ALL_SIGNAL_DATA
|
287
271
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
288
272
|
#
|
289
273
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -292,8 +276,6 @@ module Tinkerforge
|
|
292
276
|
#
|
293
277
|
# If it is set to false, the callback is continuously triggered with the period,
|
294
278
|
# independent of the value.
|
295
|
-
#
|
296
|
-
# The default value is (0, false).
|
297
279
|
def set_all_signal_data_callback_configuration(period, value_has_to_change)
|
298
280
|
send_request FUNCTION_SET_ALL_SIGNAL_DATA_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
299
281
|
end
|