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 #
|
@@ -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 #
|
@@ -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 #
|
@@ -744,7 +744,7 @@ module Tinkerforge
|
|
744
744
|
send_request FUNCTION_GET_ALL_DATA, [], '', 16, 'S l l S S S'
|
745
745
|
end
|
746
746
|
|
747
|
-
# Sets the period
|
747
|
+
# Sets the period with which the CALLBACK_ALL_DATA callback is triggered
|
748
748
|
# periodically. A value of 0 turns the callback off.
|
749
749
|
def set_all_data_period(period)
|
750
750
|
send_request FUNCTION_SET_ALL_DATA_PERIOD, [period], 'L', 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 #
|
@@ -487,7 +487,7 @@ module Tinkerforge
|
|
487
487
|
send_request FUNCTION_GET_ALL_DATA, [], '', 16, 'S l l S S S'
|
488
488
|
end
|
489
489
|
|
490
|
-
# Sets the period
|
490
|
+
# Sets the period with which the CALLBACK_ALL_DATA callback is triggered
|
491
491
|
# periodically. A value of 0 turns the callback off.
|
492
492
|
def set_all_data_period(period)
|
493
493
|
send_request FUNCTION_SET_ALL_DATA_PERIOD, [period], 'L', 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,7 +99,7 @@ module Tinkerforge
|
|
99
99
|
end
|
100
100
|
|
101
101
|
# Returns the acceleration in x, y and z direction. The values
|
102
|
-
# are given in g
|
102
|
+
# are given in gₙ/1000 (1gₙ = 9.80665m/s²).
|
103
103
|
#
|
104
104
|
# If you want to get the acceleration periodically, it is recommended
|
105
105
|
# to use the CALLBACK_ACCELERATION callback and set the period with
|
@@ -108,13 +108,11 @@ module Tinkerforge
|
|
108
108
|
send_request FUNCTION_GET_ACCELERATION, [], '', 6, 's s s'
|
109
109
|
end
|
110
110
|
|
111
|
-
# Sets the period
|
111
|
+
# Sets the period with which the CALLBACK_ACCELERATION callback is triggered
|
112
112
|
# periodically. A value of 0 turns the callback off.
|
113
113
|
#
|
114
114
|
# The CALLBACK_ACCELERATION callback is only triggered if the acceleration has
|
115
115
|
# changed since the last triggering.
|
116
|
-
#
|
117
|
-
# The default value is 0.
|
118
116
|
def set_acceleration_callback_period(period)
|
119
117
|
send_request FUNCTION_SET_ACCELERATION_CALLBACK_PERIOD, [period], 'L', 0, ''
|
120
118
|
end
|
@@ -135,8 +133,6 @@ module Tinkerforge
|
|
135
133
|
# "'i'", "Callback is triggered when the acceleration is *inside* the min and max values"
|
136
134
|
# "'<'", "Callback is triggered when the acceleration is smaller than the min value (max is ignored)"
|
137
135
|
# "'>'", "Callback is triggered when the acceleration is greater than the min value (max is ignored)"
|
138
|
-
#
|
139
|
-
# The default value is ('x', 0, 0, 0, 0, 0, 0).
|
140
136
|
def set_acceleration_callback_threshold(option, min_x, max_x, min_y, max_y, min_z, max_z)
|
141
137
|
send_request FUNCTION_SET_ACCELERATION_CALLBACK_THRESHOLD, [option, min_x, max_x, min_y, max_y, min_z, max_z], 'k s s s s s s', 0, ''
|
142
138
|
end
|
@@ -146,7 +142,7 @@ module Tinkerforge
|
|
146
142
|
send_request FUNCTION_GET_ACCELERATION_CALLBACK_THRESHOLD, [], '', 13, 'k s s s s s s'
|
147
143
|
end
|
148
144
|
|
149
|
-
# Sets the period
|
145
|
+
# Sets the period with which the threshold callback
|
150
146
|
#
|
151
147
|
# * CALLBACK_ACCELERATION_REACHED
|
152
148
|
#
|
@@ -155,8 +151,6 @@ module Tinkerforge
|
|
155
151
|
# * BrickletAccelerometer#set_acceleration_callback_threshold
|
156
152
|
#
|
157
153
|
# keeps being reached.
|
158
|
-
#
|
159
|
-
# The default value is 100.
|
160
154
|
def set_debounce_period(debounce)
|
161
155
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
162
156
|
end
|
@@ -166,7 +160,7 @@ module Tinkerforge
|
|
166
160
|
send_request FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L'
|
167
161
|
end
|
168
162
|
|
169
|
-
# Returns the temperature of the accelerometer
|
163
|
+
# Returns the temperature of the accelerometer.
|
170
164
|
def get_temperature
|
171
165
|
send_request FUNCTION_GET_TEMPERATURE, [], '', 2, 's'
|
172
166
|
end
|
@@ -175,14 +169,11 @@ module Tinkerforge
|
|
175
169
|
# Possible values are:
|
176
170
|
#
|
177
171
|
# * Data rate of 0Hz to 1600Hz.
|
178
|
-
# * Full scale range of
|
172
|
+
# * Full scale range of ±2gₙ up to ±16gₙ.
|
179
173
|
# * Filter bandwidth between 50Hz and 800Hz.
|
180
174
|
#
|
181
175
|
# Decreasing data rate or full scale range will also decrease the noise on
|
182
176
|
# the data.
|
183
|
-
#
|
184
|
-
# The default values are 100Hz data rate, -4G to +4G range and 200Hz
|
185
|
-
# filter bandwidth.
|
186
177
|
def set_configuration(data_rate, full_scale, filter_bandwidth)
|
187
178
|
send_request FUNCTION_SET_CONFIGURATION, [data_rate, full_scale, filter_bandwidth], 'C C C', 0, ''
|
188
179
|
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 #
|
@@ -35,9 +35,9 @@ module Tinkerforge
|
|
35
35
|
# full scale range (see BrickletAccelerometerV2#set_configuration) to calculate
|
36
36
|
# the data in g/10000 (same unit that is returned by BrickletAccelerometerV2#get_acceleration):
|
37
37
|
#
|
38
|
-
# * Full scale
|
39
|
-
# * Full scale
|
40
|
-
# * Full scale
|
38
|
+
# * Full scale 2g: acceleration = value*625/1024
|
39
|
+
# * Full scale 4g: acceleration = value*1250/1024
|
40
|
+
# * Full scale 8g: acceleration = value*2500/1024
|
41
41
|
#
|
42
42
|
# The data is formated in the sequence "x, y, z, x, y, z, ..." depending on
|
43
43
|
# the enabled axis. Examples:
|
@@ -47,7 +47,7 @@ module Tinkerforge
|
|
47
47
|
# * y enabled: "y, ... 30x ..., y"
|
48
48
|
CALLBACK_CONTINUOUS_ACCELERATION_16_BIT = 11
|
49
49
|
|
50
|
-
# Returns
|
50
|
+
# Returns 60 acceleration values with 8 bit resolution. The data rate can
|
51
51
|
# be configured with BrickletAccelerometerV2#set_configuration and this callback can be
|
52
52
|
# enabled with BrickletAccelerometerV2#set_continuous_acceleration_configuration.
|
53
53
|
#
|
@@ -61,9 +61,9 @@ module Tinkerforge
|
|
61
61
|
# full scale range (see BrickletAccelerometerV2#set_configuration) to calculate
|
62
62
|
# the data in g/10000 (same unit that is returned by BrickletAccelerometerV2#get_acceleration):
|
63
63
|
#
|
64
|
-
# * Full scale
|
65
|
-
# * Full scale
|
66
|
-
# * Full scale
|
64
|
+
# * Full scale 2g: acceleration = value*256*625/1024
|
65
|
+
# * Full scale 4g: acceleration = value*256*1250/1024
|
66
|
+
# * Full scale 8g: acceleration = value*256*2500/1024
|
67
67
|
#
|
68
68
|
# The data is formated in the sequence "x, y, z, x, y, z, ..." depending on
|
69
69
|
# the enabled axis. Examples:
|
@@ -179,7 +179,7 @@ module Tinkerforge
|
|
179
179
|
end
|
180
180
|
|
181
181
|
# Returns the acceleration in x, y and z direction. The values
|
182
|
-
# are given in g
|
182
|
+
# are given in gₙ/10000 (1gₙ = 9.80665m/s²).
|
183
183
|
#
|
184
184
|
# If you want to get the acceleration periodically, it is recommended
|
185
185
|
# to use the CALLBACK_ACCELERATION callback and set the period with
|
@@ -192,12 +192,10 @@ module Tinkerforge
|
|
192
192
|
# Possible values are:
|
193
193
|
#
|
194
194
|
# * Data rate of 0.781Hz to 25600Hz.
|
195
|
-
# * Full scale range of
|
195
|
+
# * Full scale range of ±2g up to ±8g.
|
196
196
|
#
|
197
197
|
# Decreasing data rate or full scale range will also decrease the noise on
|
198
198
|
# the data.
|
199
|
-
#
|
200
|
-
# The default values are 100Hz data rate and -2g to +2g range.
|
201
199
|
def set_configuration(data_rate, full_scale)
|
202
200
|
send_request FUNCTION_SET_CONFIGURATION, [data_rate, full_scale], 'C C', 0, ''
|
203
201
|
end
|
@@ -207,7 +205,7 @@ module Tinkerforge
|
|
207
205
|
send_request FUNCTION_GET_CONFIGURATION, [], '', 2, 'C C'
|
208
206
|
end
|
209
207
|
|
210
|
-
# The period
|
208
|
+
# The period is the period with which the CALLBACK_ACCELERATION
|
211
209
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
212
210
|
#
|
213
211
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -219,8 +217,6 @@ module Tinkerforge
|
|
219
217
|
#
|
220
218
|
# If this callback is enabled, the CALLBACK_CONTINUOUS_ACCELERATION_16_BIT callback
|
221
219
|
# and CALLBACK_CONTINUOUS_ACCELERATION_8_BIT callback will automatically be disabled.
|
222
|
-
#
|
223
|
-
# The default value is (0, false).
|
224
220
|
def set_acceleration_callback_configuration(period, value_has_to_change)
|
225
221
|
send_request FUNCTION_SET_ACCELERATION_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
226
222
|
end
|
@@ -264,16 +260,16 @@ module Tinkerforge
|
|
264
260
|
# resolution (8/16 bit) and the full scale range (see BrickletAccelerometerV2#set_configuration) to calculate
|
265
261
|
# the data in g/10000 (same unit that is returned by BrickletAccelerometerV2#get_acceleration):
|
266
262
|
#
|
267
|
-
# * 16 bit, full scale
|
268
|
-
# * 16 bit, full scale
|
269
|
-
# * 16 bit, full scale
|
263
|
+
# * 16 bit, full scale 2g: acceleration = value*625/1024
|
264
|
+
# * 16 bit, full scale 4g: acceleration = value*1250/1024
|
265
|
+
# * 16 bit, full scale 8g: acceleration = value*2500/1024
|
270
266
|
#
|
271
267
|
# If a resolution of 8 bit is used, only the 8 most significant bits will be
|
272
268
|
# transferred, so you can use the following formulas:
|
273
269
|
#
|
274
|
-
# * 8 bit, full scale
|
275
|
-
# * 8 bit, full scale
|
276
|
-
# * 8 bit, full scale
|
270
|
+
# * 8 bit, full scale 2g: acceleration = value*256*625/1024
|
271
|
+
# * 8 bit, full scale 4g: acceleration = value*256*1250/1024
|
272
|
+
# * 8 bit, full scale 8g: acceleration = value*256*2500/1024
|
277
273
|
#
|
278
274
|
# If no axis is enabled, both callbacks are disabled. If one of the continuous
|
279
275
|
# callbacks is enabled, the CALLBACK_ACCELERATION callback is disabled.
|
@@ -306,8 +302,6 @@ module Tinkerforge
|
|
306
302
|
# :align: center
|
307
303
|
# :target: ../../_images/Bricklets/bricklet_accelerometer_v2_filter.png
|
308
304
|
#
|
309
|
-
# By default filtering is applied and the filter corner frequency is a ninth of the output data rate.
|
310
|
-
#
|
311
305
|
# .. versionadded:: 2.0.2$nbsp;(Plugin)
|
312
306
|
def set_filter_configuration(iir_bypass, low_pass_filter)
|
313
307
|
send_request FUNCTION_SET_FILTER_CONFIGURATION, [iir_bypass, low_pass_filter], 'C 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 #
|
@@ -169,13 +169,13 @@ module Tinkerforge
|
|
169
169
|
# * IAQ Index Accuracy: 0 = unreliable to 3 = high
|
170
170
|
# * Temperature: in steps of 0.01 °C
|
171
171
|
# * Humidity: in steps of 0.01 %RH
|
172
|
-
# * Air Pressure: in steps of 0.01
|
172
|
+
# * Air Pressure: in steps of 0.01 hPa
|
173
173
|
def get_all_values
|
174
174
|
send_request FUNCTION_GET_ALL_VALUES, [], '', 17, 'l C l l l'
|
175
175
|
end
|
176
176
|
|
177
|
-
# Sets a temperature offset with resolution 1/100°C. A offset of 10 will decrease
|
178
|
-
# the measured temperature by 0.1°C.
|
177
|
+
# Sets a temperature offset with resolution 1/100 °C. A offset of 10 will decrease
|
178
|
+
# the measured temperature by 0.1 °C.
|
179
179
|
#
|
180
180
|
# If you install this Bricklet into an enclosure and you want to measure the ambient
|
181
181
|
# temperature, you may have to decrease the measured temperature by some value to
|
@@ -199,7 +199,7 @@ module Tinkerforge
|
|
199
199
|
send_request FUNCTION_GET_TEMPERATURE_OFFSET, [], '', 4, 'l'
|
200
200
|
end
|
201
201
|
|
202
|
-
# The period
|
202
|
+
# The period is the period with which the CALLBACK_ALL_VALUES
|
203
203
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
204
204
|
#
|
205
205
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -208,8 +208,6 @@ module Tinkerforge
|
|
208
208
|
#
|
209
209
|
# If it is set to false, the callback is continuously triggered with the period,
|
210
210
|
# independent of the value.
|
211
|
-
#
|
212
|
-
# The default value is (0, false).
|
213
211
|
def set_all_values_callback_configuration(period, value_has_to_change)
|
214
212
|
send_request FUNCTION_SET_ALL_VALUES_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
215
213
|
end
|
@@ -236,7 +234,7 @@ module Tinkerforge
|
|
236
234
|
send_request FUNCTION_GET_IAQ_INDEX, [], '', 5, 'l C'
|
237
235
|
end
|
238
236
|
|
239
|
-
# The period
|
237
|
+
# The period is the period with which the CALLBACK_IAQ_INDEX
|
240
238
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
241
239
|
#
|
242
240
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -245,8 +243,6 @@ module Tinkerforge
|
|
245
243
|
#
|
246
244
|
# If it is set to false, the callback is continuously triggered with the period,
|
247
245
|
# independent of the value.
|
248
|
-
#
|
249
|
-
# The default value is (0, false).
|
250
246
|
def set_iaq_index_callback_configuration(period, value_has_to_change)
|
251
247
|
send_request FUNCTION_SET_IAQ_INDEX_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
252
248
|
end
|
@@ -267,7 +263,7 @@ module Tinkerforge
|
|
267
263
|
send_request FUNCTION_GET_TEMPERATURE, [], '', 4, 'l'
|
268
264
|
end
|
269
265
|
|
270
|
-
# The period
|
266
|
+
# The period is the period with which the CALLBACK_TEMPERATURE callback is triggered
|
271
267
|
# periodically. A value of 0 turns the callback off.
|
272
268
|
#
|
273
269
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -292,8 +288,6 @@ module Tinkerforge
|
|
292
288
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
293
289
|
#
|
294
290
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
295
|
-
#
|
296
|
-
# The default value is (0, false, 'x', 0, 0).
|
297
291
|
def set_temperature_callback_configuration(period, value_has_to_change, option, min, max)
|
298
292
|
send_request FUNCTION_SET_TEMPERATURE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 0, ''
|
299
293
|
end
|
@@ -313,7 +307,7 @@ module Tinkerforge
|
|
313
307
|
send_request FUNCTION_GET_HUMIDITY, [], '', 4, 'l'
|
314
308
|
end
|
315
309
|
|
316
|
-
# The period
|
310
|
+
# The period is the period with which the CALLBACK_HUMIDITY callback is triggered
|
317
311
|
# periodically. A value of 0 turns the callback off.
|
318
312
|
#
|
319
313
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -338,8 +332,6 @@ module Tinkerforge
|
|
338
332
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
339
333
|
#
|
340
334
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
341
|
-
#
|
342
|
-
# The default value is (0, false, 'x', 0, 0).
|
343
335
|
def set_humidity_callback_configuration(period, value_has_to_change, option, min, max)
|
344
336
|
send_request FUNCTION_SET_HUMIDITY_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 0, ''
|
345
337
|
end
|
@@ -349,7 +341,7 @@ module Tinkerforge
|
|
349
341
|
send_request FUNCTION_GET_HUMIDITY_CALLBACK_CONFIGURATION, [], '', 14, 'L ? k l l'
|
350
342
|
end
|
351
343
|
|
352
|
-
# Returns air pressure in steps of 0.01
|
344
|
+
# Returns air pressure in steps of 0.01 hPa.
|
353
345
|
#
|
354
346
|
#
|
355
347
|
# If you want to get the value periodically, it is recommended to use the
|
@@ -359,7 +351,7 @@ module Tinkerforge
|
|
359
351
|
send_request FUNCTION_GET_AIR_PRESSURE, [], '', 4, 'l'
|
360
352
|
end
|
361
353
|
|
362
|
-
# The period
|
354
|
+
# The period is the period with which the CALLBACK_AIR_PRESSURE callback is triggered
|
363
355
|
# periodically. A value of 0 turns the callback off.
|
364
356
|
#
|
365
357
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -384,8 +376,6 @@ module Tinkerforge
|
|
384
376
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
385
377
|
#
|
386
378
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
387
|
-
#
|
388
|
-
# The default value is (0, false, 'x', 0, 0).
|
389
379
|
def set_air_pressure_callback_configuration(period, value_has_to_change, option, min, max)
|
390
380
|
send_request FUNCTION_SET_AIR_PRESSURE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 0, ''
|
391
381
|
end
|
@@ -422,7 +412,7 @@ module Tinkerforge
|
|
422
412
|
# duration is saved in flash, so you should only have to call this function
|
423
413
|
# once in the lifetime of the Bricklet.
|
424
414
|
#
|
425
|
-
# The Bricklet has to be power cycled after this function is called
|
415
|
+
# The Bricklet has to be power cycled after this function is called
|
426
416
|
# for a duration change to take effect.
|
427
417
|
#
|
428
418
|
# Before firmware version 2.0.3 this was not configurable and the duration was
|
@@ -435,7 +425,7 @@ module Tinkerforge
|
|
435
425
|
send_request FUNCTION_SET_BACKGROUND_CALIBRATION_DURATION, [duration], 'C', 0, ''
|
436
426
|
end
|
437
427
|
|
438
|
-
# Returns the background calibration duration as set by
|
428
|
+
# Returns the background calibration duration as set by
|
439
429
|
# BrickletAirQuality#set_background_calibration_duration.
|
440
430
|
#
|
441
431
|
# .. versionadded:: 2.0.3$nbsp;(Plugin)
|
@@ -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 #
|
@@ -19,16 +19,16 @@ module Tinkerforge
|
|
19
19
|
# BrickletAmbientLight#set_illuminance_callback_period. The parameter is the illuminance of the
|
20
20
|
# ambient light sensor.
|
21
21
|
#
|
22
|
-
# The CALLBACK_ILLUMINANCE callback is only triggered if the illuminance has changed
|
23
|
-
# last triggering.
|
22
|
+
# The CALLBACK_ILLUMINANCE callback is only triggered if the illuminance has changed
|
23
|
+
# since the last triggering.
|
24
24
|
CALLBACK_ILLUMINANCE = 13
|
25
25
|
|
26
26
|
# This callback is triggered periodically with the period that is set by
|
27
27
|
# BrickletAmbientLight#set_analog_value_callback_period. The parameter is the analog value of the
|
28
28
|
# ambient light sensor.
|
29
29
|
#
|
30
|
-
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
31
|
-
# last triggering.
|
30
|
+
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
31
|
+
# changed since the last triggering.
|
32
32
|
CALLBACK_ANALOG_VALUE = 14
|
33
33
|
|
34
34
|
# This callback is triggered when the threshold as set by
|
@@ -95,9 +95,7 @@ module Tinkerforge
|
|
95
95
|
|
96
96
|
end
|
97
97
|
|
98
|
-
# Returns the illuminance of the ambient light sensor.
|
99
|
-
# has a range of 0 to 9000 and is given in lux/10, i.e. a value
|
100
|
-
# of 4500 means that an illuminance of 450lux is measured.
|
98
|
+
# Returns the illuminance of the ambient light sensor.
|
101
99
|
#
|
102
100
|
# If you want to get the illuminance periodically, it is recommended to use the
|
103
101
|
# CALLBACK_ILLUMINANCE 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 BrickletAmbientLight#get_illuminance is averaged over several samples
|
@@ -126,13 +123,11 @@ module Tinkerforge
|
|
126
123
|
send_request FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S'
|
127
124
|
end
|
128
125
|
|
129
|
-
# Sets the period
|
126
|
+
# Sets the period with which the CALLBACK_ILLUMINANCE callback is triggered
|
130
127
|
# periodically. A value of 0 turns the callback off.
|
131
128
|
#
|
132
|
-
# The CALLBACK_ILLUMINANCE callback is only triggered if the illuminance has changed
|
133
|
-
# last triggering.
|
134
|
-
#
|
135
|
-
# The default value is 0.
|
129
|
+
# The CALLBACK_ILLUMINANCE callback is only triggered if the illuminance has changed
|
130
|
+
# since the last triggering.
|
136
131
|
def set_illuminance_callback_period(period)
|
137
132
|
send_request FUNCTION_SET_ILLUMINANCE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
138
133
|
end
|
@@ -142,13 +137,11 @@ module Tinkerforge
|
|
142
137
|
send_request FUNCTION_GET_ILLUMINANCE_CALLBACK_PERIOD, [], '', 4, 'L'
|
143
138
|
end
|
144
139
|
|
145
|
-
# Sets the period
|
140
|
+
# Sets the period with which the CALLBACK_ANALOG_VALUE callback is triggered
|
146
141
|
# periodically. A value of 0 turns the callback off.
|
147
142
|
#
|
148
|
-
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
149
|
-
# last triggering.
|
150
|
-
#
|
151
|
-
# The default value is 0.
|
143
|
+
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
144
|
+
# changed since the last triggering.
|
152
145
|
def set_analog_value_callback_period(period)
|
153
146
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
154
147
|
end
|
@@ -169,8 +162,6 @@ module Tinkerforge
|
|
169
162
|
# "'i'", "Callback is triggered when the illuminance is *inside* the min and max values"
|
170
163
|
# "'<'", "Callback is triggered when the illuminance is smaller than the min value (max is ignored)"
|
171
164
|
# "'>'", "Callback is triggered when the illuminance is greater than the min value (max is ignored)"
|
172
|
-
#
|
173
|
-
# The default value is ('x', 0, 0).
|
174
165
|
def set_illuminance_callback_threshold(option, min, max)
|
175
166
|
send_request FUNCTION_SET_ILLUMINANCE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
176
167
|
end
|
@@ -191,8 +182,6 @@ module Tinkerforge
|
|
191
182
|
# "'i'", "Callback is triggered when the analog value is *inside* the min and max values"
|
192
183
|
# "'<'", "Callback is triggered when the analog value is smaller than the min value (max is ignored)"
|
193
184
|
# "'>'", "Callback is triggered when the analog value is greater than the min value (max is ignored)"
|
194
|
-
#
|
195
|
-
# The default value is ('x', 0, 0).
|
196
185
|
def set_analog_value_callback_threshold(option, min, max)
|
197
186
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
198
187
|
end
|
@@ -202,7 +191,7 @@ module Tinkerforge
|
|
202
191
|
send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
203
192
|
end
|
204
193
|
|
205
|
-
# Sets the period
|
194
|
+
# Sets the period with which the threshold callbacks
|
206
195
|
#
|
207
196
|
# * CALLBACK_ILLUMINANCE_REACHED,
|
208
197
|
# * CALLBACK_ANALOG_VALUE_REACHED
|
@@ -213,8 +202,6 @@ module Tinkerforge
|
|
213
202
|
# * BrickletAmbientLight#set_analog_value_callback_threshold
|
214
203
|
#
|
215
204
|
# keep being reached.
|
216
|
-
#
|
217
|
-
# The default value is 100.
|
218
205
|
def set_debounce_period(debounce)
|
219
206
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
220
207
|
end
|