tinkerforge 2.1.11 → 2.1.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tinkerforge/brick_dc.rb +31 -9
- data/lib/tinkerforge/brick_imu.rb +62 -40
- data/lib/tinkerforge/brick_imu_v2.rb +70 -42
- data/lib/tinkerforge/brick_master.rb +47 -23
- data/lib/tinkerforge/brick_red.rb +3 -3
- data/lib/tinkerforge/brick_servo.rb +40 -18
- data/lib/tinkerforge/brick_silent_stepper.rb +829 -0
- data/lib/tinkerforge/brick_stepper.rb +47 -25
- data/lib/tinkerforge/bricklet_accelerometer.rb +11 -11
- data/lib/tinkerforge/bricklet_ambient_light.rb +12 -12
- data/lib/tinkerforge/bricklet_ambient_light_v2.rb +8 -8
- data/lib/tinkerforge/bricklet_analog_in.rb +18 -18
- data/lib/tinkerforge/bricklet_analog_in_v2.rb +15 -15
- data/lib/tinkerforge/bricklet_analog_out.rb +3 -3
- data/lib/tinkerforge/bricklet_analog_out_v2.rb +3 -3
- data/lib/tinkerforge/bricklet_barometer.rb +19 -19
- data/lib/tinkerforge/bricklet_can.rb +20 -7
- data/lib/tinkerforge/bricklet_co2.rb +14 -14
- data/lib/tinkerforge/bricklet_color.rb +19 -19
- data/lib/tinkerforge/bricklet_current12.rb +16 -16
- data/lib/tinkerforge/bricklet_current25.rb +15 -15
- data/lib/tinkerforge/bricklet_distance_ir.rb +14 -14
- data/lib/tinkerforge/bricklet_distance_us.rb +9 -9
- data/lib/tinkerforge/bricklet_dual_button.rb +5 -5
- data/lib/tinkerforge/bricklet_dual_relay.rb +13 -13
- data/lib/tinkerforge/bricklet_dust_detector.rb +11 -11
- data/lib/tinkerforge/bricklet_gps.rb +21 -21
- data/lib/tinkerforge/bricklet_hall_effect.rb +12 -10
- data/lib/tinkerforge/bricklet_humidity.rb +21 -21
- data/lib/tinkerforge/bricklet_industrial_analog_out.rb +3 -3
- data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +4 -4
- data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +4 -4
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +6 -6
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +6 -6
- data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +5 -5
- data/lib/tinkerforge/bricklet_io16.rb +5 -5
- data/lib/tinkerforge/bricklet_io4.rb +5 -5
- data/lib/tinkerforge/bricklet_joystick.rb +16 -16
- data/lib/tinkerforge/bricklet_laser_range_finder.rb +99 -30
- data/lib/tinkerforge/bricklet_lcd_16x2.rb +5 -5
- data/lib/tinkerforge/bricklet_lcd_20x4.rb +5 -5
- data/lib/tinkerforge/bricklet_led_strip.rb +3 -3
- data/lib/tinkerforge/bricklet_line.rb +12 -12
- data/lib/tinkerforge/bricklet_linear_poti.rb +21 -21
- data/lib/tinkerforge/bricklet_load_cell.rb +10 -10
- data/lib/tinkerforge/bricklet_moisture.rb +12 -12
- data/lib/tinkerforge/bricklet_motion_detector.rb +5 -5
- data/lib/tinkerforge/bricklet_multi_touch.rb +3 -3
- data/lib/tinkerforge/bricklet_nfc_rfid.rb +20 -20
- data/lib/tinkerforge/bricklet_oled_128x64.rb +7 -7
- data/lib/tinkerforge/bricklet_oled_64x48.rb +6 -6
- data/lib/tinkerforge/bricklet_piezo_buzzer.rb +4 -4
- data/lib/tinkerforge/bricklet_piezo_speaker.rb +5 -5
- data/lib/tinkerforge/bricklet_ptc.rb +21 -21
- data/lib/tinkerforge/bricklet_real_time_clock.rb +7 -7
- data/lib/tinkerforge/bricklet_remote_switch.rb +3 -3
- data/lib/tinkerforge/bricklet_rgb_led.rb +3 -3
- data/lib/tinkerforge/bricklet_rotary_encoder.rb +6 -6
- data/lib/tinkerforge/bricklet_rotary_poti.rb +23 -23
- data/lib/tinkerforge/bricklet_rs232.rb +19 -16
- data/lib/tinkerforge/bricklet_segment_display_4x7.rb +5 -5
- data/lib/tinkerforge/bricklet_solid_state_relay.rb +12 -12
- data/lib/tinkerforge/bricklet_sound_intensity.rb +13 -12
- data/lib/tinkerforge/bricklet_temperature.rb +12 -12
- data/lib/tinkerforge/bricklet_temperature_ir.rb +30 -30
- data/lib/tinkerforge/bricklet_thermocouple.rb +13 -13
- data/lib/tinkerforge/bricklet_tilt.rb +3 -3
- data/lib/tinkerforge/bricklet_uv_light.rb +10 -10
- data/lib/tinkerforge/bricklet_voltage.rb +18 -18
- data/lib/tinkerforge/bricklet_voltage_current.rb +23 -23
- data/lib/tinkerforge/version.rb +1 -1
- metadata +3 -2
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2017-
|
3
|
+
# This file was automatically generated on 2017-04-21. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.12 #
|
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
|
# BrickletAnalogInV2#set_voltage_callback_period. The parameter is the voltage of the
|
20
20
|
# sensor.
|
21
21
|
#
|
22
|
-
# CALLBACK_VOLTAGE is only triggered if the voltage has changed since
|
23
|
-
# last triggering.
|
22
|
+
# Der CALLBACK_VOLTAGE callback is only triggered if the voltage has changed since
|
23
|
+
# the last triggering.
|
24
24
|
CALLBACK_VOLTAGE = 15
|
25
25
|
|
26
26
|
# This callback is triggered periodically with the period that is set by
|
27
|
-
# BrickletAnalogInV2#set_analog_value_callback_period. The parameter is the analog
|
28
|
-
# sensor.
|
27
|
+
# BrickletAnalogInV2#set_analog_value_callback_period. The parameter is the analog
|
28
|
+
# value of the sensor.
|
29
29
|
#
|
30
|
-
# CALLBACK_ANALOG_VALUE is only triggered if the voltage has changed
|
31
|
-
# last triggering.
|
30
|
+
# The CALLBACK_ANALOG_VALUE callback is only triggered if the voltage has changed
|
31
|
+
# since the last triggering.
|
32
32
|
CALLBACK_ANALOG_VALUE = 16
|
33
33
|
|
34
34
|
# This callback is triggered when the threshold as set by
|
@@ -106,7 +106,7 @@ module Tinkerforge
|
|
106
106
|
# between 0V and 42V. The resolution is approximately 10mV.
|
107
107
|
#
|
108
108
|
# If you want to get the voltage periodically, it is recommended to use the
|
109
|
-
# callback
|
109
|
+
# CALLBACK_VOLTAGE callback and set the period with
|
110
110
|
# BrickletAnalogInV2#set_voltage_callback_period.
|
111
111
|
def get_voltage
|
112
112
|
send_request(FUNCTION_GET_VOLTAGE, [], '', 2, 'S')
|
@@ -116,7 +116,7 @@ module Tinkerforge
|
|
116
116
|
# The value is between 0 and 4095.
|
117
117
|
#
|
118
118
|
# If you want the analog value periodically, it is recommended to use the
|
119
|
-
# callback
|
119
|
+
# CALLBACK_ANALOG_VALUE callback and set the period with
|
120
120
|
# BrickletAnalogInV2#set_analog_value_callback_period.
|
121
121
|
def get_analog_value
|
122
122
|
send_request(FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S')
|
@@ -125,8 +125,8 @@ module Tinkerforge
|
|
125
125
|
# Sets the period in ms with which the CALLBACK_VOLTAGE callback is triggered
|
126
126
|
# periodically. A value of 0 turns the callback off.
|
127
127
|
#
|
128
|
-
# CALLBACK_VOLTAGE is only triggered if the voltage has changed since
|
129
|
-
# last triggering.
|
128
|
+
# The CALLBACK_VOLTAGE callback is only triggered if the voltage has changed since
|
129
|
+
# the last triggering.
|
130
130
|
#
|
131
131
|
# The default value is 0.
|
132
132
|
def set_voltage_callback_period(period)
|
@@ -141,8 +141,8 @@ module Tinkerforge
|
|
141
141
|
# Sets the period in ms with which the CALLBACK_ANALOG_VALUE callback is triggered
|
142
142
|
# periodically. A value of 0 turns the callback off.
|
143
143
|
#
|
144
|
-
# CALLBACK_ANALOG_VALUE is only triggered if the analog value has
|
145
|
-
# last triggering.
|
144
|
+
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
145
|
+
# changed since the last triggering.
|
146
146
|
#
|
147
147
|
# The default value is 0.
|
148
148
|
def set_analog_value_callback_period(period)
|
@@ -238,7 +238,7 @@ module Tinkerforge
|
|
238
238
|
send_request(FUNCTION_GET_MOVING_AVERAGE, [], '', 1, 'C')
|
239
239
|
end
|
240
240
|
|
241
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
241
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
242
242
|
# the position, the hardware and firmware version as well as the
|
243
243
|
# device identifier.
|
244
244
|
#
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2017-
|
3
|
+
# This file was automatically generated on 2017-04-21. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.12 #
|
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 #
|
@@ -74,7 +74,7 @@ module Tinkerforge
|
|
74
74
|
send_request(FUNCTION_GET_MODE, [], '', 1, 'C')
|
75
75
|
end
|
76
76
|
|
77
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
77
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
78
78
|
# the position, the hardware and firmware version as well as the
|
79
79
|
# device identifier.
|
80
80
|
#
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2017-
|
3
|
+
# This file was automatically generated on 2017-04-21. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.12 #
|
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 #
|
@@ -50,7 +50,7 @@ module Tinkerforge
|
|
50
50
|
send_request(FUNCTION_GET_INPUT_VOLTAGE, [], '', 2, 'S')
|
51
51
|
end
|
52
52
|
|
53
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
53
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
54
54
|
# the position, the hardware and firmware version as well as the
|
55
55
|
# device identifier.
|
56
56
|
#
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2017-
|
3
|
+
# This file was automatically generated on 2017-04-21. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.12 #
|
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 #
|
@@ -16,19 +16,19 @@ module Tinkerforge
|
|
16
16
|
DEVICE_DISPLAY_NAME = 'Barometer Bricklet' # :nodoc:
|
17
17
|
|
18
18
|
# This callback is triggered periodically with the period that is set by
|
19
|
-
# BrickletBarometer#set_air_pressure_callback_period. The parameter is the air
|
20
|
-
# air pressure sensor.
|
19
|
+
# BrickletBarometer#set_air_pressure_callback_period. The parameter is the air
|
20
|
+
# pressure of the air pressure sensor.
|
21
21
|
#
|
22
|
-
# CALLBACK_AIR_PRESSURE is only triggered if the air pressure has
|
23
|
-
# last triggering.
|
22
|
+
# The CALLBACK_AIR_PRESSURE callback is only triggered if the air pressure has
|
23
|
+
# changed since the last triggering.
|
24
24
|
CALLBACK_AIR_PRESSURE = 15
|
25
25
|
|
26
26
|
# This callback is triggered periodically with the period that is set by
|
27
|
-
# BrickletBarometer#set_altitude_callback_period. The parameter is the altitude of
|
28
|
-
# air pressure sensor.
|
27
|
+
# BrickletBarometer#set_altitude_callback_period. The parameter is the altitude of
|
28
|
+
# the air pressure sensor.
|
29
29
|
#
|
30
|
-
# CALLBACK_ALTITUDE is only triggered if the altitude has changed since
|
31
|
-
# last triggering.
|
30
|
+
# The CALLBACK_ALTITUDE callback is only triggered if the altitude has changed since
|
31
|
+
# the last triggering.
|
32
32
|
CALLBACK_ALTITUDE = 16
|
33
33
|
|
34
34
|
# This callback is triggered when the threshold as set by
|
@@ -113,7 +113,7 @@ module Tinkerforge
|
|
113
113
|
# of 1001092 means that an air pressure of 1001.092 mbar is measured.
|
114
114
|
#
|
115
115
|
# If you want to get the air pressure periodically, it is recommended to use the
|
116
|
-
# callback
|
116
|
+
# CALLBACK_AIR_PRESSURE callback and set the period with
|
117
117
|
# BrickletBarometer#set_air_pressure_callback_period.
|
118
118
|
def get_air_pressure
|
119
119
|
send_request(FUNCTION_GET_AIR_PRESSURE, [], '', 4, 'l')
|
@@ -124,7 +124,7 @@ module Tinkerforge
|
|
124
124
|
# and the reference air pressure that can be set with BrickletBarometer#set_reference_air_pressure.
|
125
125
|
#
|
126
126
|
# If you want to get the altitude periodically, it is recommended to use the
|
127
|
-
# callback
|
127
|
+
# CALLBACK_ALTITUDE callback and set the period with
|
128
128
|
# BrickletBarometer#set_altitude_callback_period.
|
129
129
|
def get_altitude
|
130
130
|
send_request(FUNCTION_GET_ALTITUDE, [], '', 4, 'l')
|
@@ -133,8 +133,8 @@ module Tinkerforge
|
|
133
133
|
# Sets the period in ms with which the CALLBACK_AIR_PRESSURE callback is triggered
|
134
134
|
# periodically. A value of 0 turns the callback off.
|
135
135
|
#
|
136
|
-
# CALLBACK_AIR_PRESSURE is only triggered if the air pressure has
|
137
|
-
# last triggering.
|
136
|
+
# The CALLBACK_AIR_PRESSURE callback is only triggered if the air pressure has
|
137
|
+
# changed since the last triggering.
|
138
138
|
#
|
139
139
|
# The default value is 0.
|
140
140
|
def set_air_pressure_callback_period(period)
|
@@ -149,8 +149,8 @@ module Tinkerforge
|
|
149
149
|
# Sets the period in ms with which the CALLBACK_ALTITUDE callback is triggered
|
150
150
|
# periodically. A value of 0 turns the callback off.
|
151
151
|
#
|
152
|
-
# CALLBACK_ALTITUDE is only triggered if the altitude has changed since
|
153
|
-
# last triggering.
|
152
|
+
# The CALLBACK_ALTITUDE callback is only triggered if the altitude has changed since
|
153
|
+
# the last triggering.
|
154
154
|
#
|
155
155
|
# The default value is 0.
|
156
156
|
def set_altitude_callback_period(period)
|
@@ -262,9 +262,9 @@ module Tinkerforge
|
|
262
262
|
|
263
263
|
# Sets the different averaging parameters. It is possible to set
|
264
264
|
# the length of a normal averaging for the temperature and pressure,
|
265
|
-
# as well as an additional length of a
|
265
|
+
# as well as an additional length of a
|
266
266
|
# `moving average <https://en.wikipedia.org/wiki/Moving_average>`__
|
267
|
-
# for the pressure. The moving average is calculated from the normal
|
267
|
+
# for the pressure. The moving average is calculated from the normal
|
268
268
|
# averages. There is no moving average for the temperature.
|
269
269
|
#
|
270
270
|
# The maximum length for the pressure average is 10, for the
|
@@ -291,7 +291,7 @@ module Tinkerforge
|
|
291
291
|
send_request(FUNCTION_GET_AVERAGING, [], '', 3, 'C C C')
|
292
292
|
end
|
293
293
|
|
294
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
294
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
295
295
|
# the position, the hardware and firmware version as well as the
|
296
296
|
# device identifier.
|
297
297
|
#
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2017-
|
3
|
+
# This file was automatically generated on 2017-04-21. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.12 #
|
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 #
|
@@ -18,6 +18,9 @@ module Tinkerforge
|
|
18
18
|
# This callback is triggered if a data or remote frame was received by the CAN
|
19
19
|
# transceiver.
|
20
20
|
#
|
21
|
+
# The ``identifier`` return value follows the identifier format described for
|
22
|
+
# BrickletCAN#write_frame.
|
23
|
+
#
|
21
24
|
# For remote frames the ``data`` return value always contains invalid values.
|
22
25
|
#
|
23
26
|
# A configurable read filter can be used to define which frames should be
|
@@ -85,8 +88,13 @@ module Tinkerforge
|
|
85
88
|
# Writes a data or remote frame to the write buffer to be transmitted over the
|
86
89
|
# CAN transceiver.
|
87
90
|
#
|
88
|
-
# The Bricklet supports the standard 11-bit (CAN 2.0A) and the extended
|
89
|
-
# (CAN 2.0B) identifiers. For
|
91
|
+
# The Bricklet supports the standard 11-bit (CAN 2.0A) and the additional extended
|
92
|
+
# 18-bit (CAN 2.0B) identifiers. For standard frames the Bricklet uses bit 0 to 10
|
93
|
+
# from the ``identifier`` parameter as standard 11-bit identifier. For extended
|
94
|
+
# frames the Bricklet additionally uses bit 11 to 28 from the ``identifier``
|
95
|
+
# parameter as extended 18-bit identifier.
|
96
|
+
#
|
97
|
+
# For remote frames the ``data`` parameter is ignored.
|
90
98
|
#
|
91
99
|
# Returns *true* if the frame was successfully added to the write buffer. Returns
|
92
100
|
# *false* if the frame could not be added because write buffer is already full.
|
@@ -108,6 +116,9 @@ module Tinkerforge
|
|
108
116
|
# empty and no frame could be read, then the ``success`` return value is set to
|
109
117
|
# *false* and the other return values contain invalid data.
|
110
118
|
#
|
119
|
+
# The ``identifier`` return value follows the identifier format described for
|
120
|
+
# BrickletCAN#write_frame.
|
121
|
+
#
|
111
122
|
# For remote frames the ``data`` return value always contains invalid data.
|
112
123
|
#
|
113
124
|
# A configurable read filter can be used to define which frames should be
|
@@ -198,8 +209,10 @@ module Tinkerforge
|
|
198
209
|
# to match the 11-bit identifier of standard frames. Bit 11 to 18 (8 bits) and
|
199
210
|
# bit 19 to 26 (8 bits) of mask and filters are used to match the first and
|
200
211
|
# second data byte (if present) of standard frames.
|
201
|
-
# * Match-Extended: Bit 0 to
|
202
|
-
# the
|
212
|
+
# * Match-Extended: Bit 0 to 10 (11 bits) of mask and filters are used
|
213
|
+
# to match the standard 11-bit identifier part of extended frames. Bit 11 to 28
|
214
|
+
# (18 bits) of mask and filters are used to match the extended 18-bit identifier
|
215
|
+
# part of extended frames.
|
203
216
|
#
|
204
217
|
# The mask and filters are applied in this way: The mask is used to select the
|
205
218
|
# identifier and data bits that should be compared to the corresponding filter
|
@@ -270,7 +283,7 @@ module Tinkerforge
|
|
270
283
|
send_request(FUNCTION_GET_ERROR_LOG, [], '', 15, 'C C ? L L L')
|
271
284
|
end
|
272
285
|
|
273
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
286
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
274
287
|
# the position, the hardware and firmware version as well as the
|
275
288
|
# device identifier.
|
276
289
|
#
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2017-
|
3
|
+
# This file was automatically generated on 2017-04-21. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.12 #
|
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 #
|
@@ -16,11 +16,11 @@ module Tinkerforge
|
|
16
16
|
DEVICE_DISPLAY_NAME = 'CO2 Bricklet' # :nodoc:
|
17
17
|
|
18
18
|
# This callback is triggered periodically with the period that is set by
|
19
|
-
# BrickletCO2#set_co2_concentration_callback_period. The parameter is the CO2
|
20
|
-
# sensor.
|
19
|
+
# BrickletCO2#set_co2_concentration_callback_period. The parameter is the CO2
|
20
|
+
# concentration of the sensor.
|
21
21
|
#
|
22
|
-
# CALLBACK_CO2_CONCENTRATION is only triggered if the CO2 concentration
|
23
|
-
# last triggering.
|
22
|
+
# The CALLBACK_CO2_CONCENTRATION callback is only triggered if the CO2 concentration
|
23
|
+
# has changed since the last triggering.
|
24
24
|
CALLBACK_CO2_CONCENTRATION = 8
|
25
25
|
|
26
26
|
# This callback is triggered when the threshold as set by
|
@@ -68,22 +68,22 @@ module Tinkerforge
|
|
68
68
|
@callback_formats[CALLBACK_CO2_CONCENTRATION_REACHED] = 'S'
|
69
69
|
end
|
70
70
|
|
71
|
-
# Returns the measured CO2 concentration. The value is in
|
71
|
+
# Returns the measured CO2 concentration. The value is in
|
72
72
|
# `ppm (parts per million) <https://en.wikipedia.org/wiki/Parts-per_notation>`__
|
73
73
|
# and between 0 to 10000.
|
74
74
|
#
|
75
|
-
# If you want to get the CO2 concentration periodically, it is recommended to use
|
76
|
-
#
|
75
|
+
# If you want to get the CO2 concentration periodically, it is recommended to use
|
76
|
+
# the CALLBACK_CO2_CONCENTRATION callback and set the period with
|
77
77
|
# BrickletCO2#set_co2_concentration_callback_period.
|
78
78
|
def get_co2_concentration
|
79
79
|
send_request(FUNCTION_GET_CO2_CONCENTRATION, [], '', 2, 'S')
|
80
80
|
end
|
81
81
|
|
82
|
-
# Sets the period in ms with which the CALLBACK_CO2_CONCENTRATION callback is
|
83
|
-
# periodically. A value of 0 turns the callback off.
|
82
|
+
# Sets the period in ms with which the CALLBACK_CO2_CONCENTRATION callback is
|
83
|
+
# triggered periodically. A value of 0 turns the callback off.
|
84
84
|
#
|
85
|
-
# CALLBACK_CO2_CONCENTRATION is only triggered if the CO2 concentration
|
86
|
-
# last triggering.
|
85
|
+
# The CALLBACK_CO2_CONCENTRATION callback is only triggered if the CO2 concentration
|
86
|
+
# has changed since the last triggering.
|
87
87
|
#
|
88
88
|
# The default value is 0.
|
89
89
|
def set_co2_concentration_callback_period(period)
|
@@ -137,7 +137,7 @@ module Tinkerforge
|
|
137
137
|
send_request(FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L')
|
138
138
|
end
|
139
139
|
|
140
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
140
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
141
141
|
# the position, the hardware and firmware version as well as the
|
142
142
|
# device identifier.
|
143
143
|
#
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2017-
|
3
|
+
# This file was automatically generated on 2017-04-21. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.12 #
|
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,7 +19,7 @@ module Tinkerforge
|
|
19
19
|
# BrickletColor#set_color_callback_period. The parameter is the color
|
20
20
|
# of the sensor as RGBC.
|
21
21
|
#
|
22
|
-
# CALLBACK_COLOR is only triggered if the color has changed since the
|
22
|
+
# The CALLBACK_COLOR callback is only triggered if the color has changed since the
|
23
23
|
# last triggering.
|
24
24
|
CALLBACK_COLOR = 8
|
25
25
|
|
@@ -36,16 +36,16 @@ module Tinkerforge
|
|
36
36
|
# BrickletColor#set_illuminance_callback_period. The parameter is the illuminance.
|
37
37
|
# See BrickletColor#get_illuminance for how to interpret this value.
|
38
38
|
#
|
39
|
-
# CALLBACK_ILLUMINANCE is only triggered if the illuminance has changed
|
40
|
-
# last triggering.
|
39
|
+
# The CALLBACK_ILLUMINANCE callback is only triggered if the illuminance has changed
|
40
|
+
# since the last triggering.
|
41
41
|
CALLBACK_ILLUMINANCE = 21
|
42
42
|
|
43
43
|
# This callback is triggered periodically with the period that is set by
|
44
|
-
# BrickletColor#set_color_temperature_callback_period. The parameter is the
|
44
|
+
# BrickletColor#set_color_temperature_callback_period. The parameter is the
|
45
45
|
# color temperature in Kelvin.
|
46
46
|
#
|
47
|
-
# CALLBACK_COLOR_TEMPERATURE is only triggered if the color temperature
|
48
|
-
# changed since the last triggering.
|
47
|
+
# The CALLBACK_COLOR_TEMPERATURE callback is only triggered if the color temperature
|
48
|
+
# has changed since the last triggering.
|
49
49
|
CALLBACK_COLOR_TEMPERATURE = 22
|
50
50
|
|
51
51
|
FUNCTION_GET_COLOR = 1 # :nodoc:
|
@@ -135,8 +135,8 @@ module Tinkerforge
|
|
135
135
|
# :align: center
|
136
136
|
# :target: ../../_images/Bricklets/bricklet_color_wavelength_chart_600.jpg
|
137
137
|
#
|
138
|
-
# If you want to get the color periodically, it is recommended
|
139
|
-
# to use the callback
|
138
|
+
# If you want to get the color periodically, it is recommended
|
139
|
+
# to use the CALLBACK_COLOR callback and set the period with
|
140
140
|
# BrickletColor#set_color_callback_period.
|
141
141
|
def get_color
|
142
142
|
send_request(FUNCTION_GET_COLOR, [], '', 8, 'S S S S')
|
@@ -145,7 +145,7 @@ module Tinkerforge
|
|
145
145
|
# Sets the period in ms with which the CALLBACK_COLOR callback is triggered
|
146
146
|
# periodically. A value of 0 turns the callback off.
|
147
147
|
#
|
148
|
-
# CALLBACK_COLOR is only triggered if the color has changed since the
|
148
|
+
# The CALLBACK_COLOR callback is only triggered if the color has changed since the
|
149
149
|
# last triggering.
|
150
150
|
#
|
151
151
|
# The default value is 0.
|
@@ -158,7 +158,7 @@ module Tinkerforge
|
|
158
158
|
send_request(FUNCTION_GET_COLOR_CALLBACK_PERIOD, [], '', 4, 'L')
|
159
159
|
end
|
160
160
|
|
161
|
-
# Sets the thresholds for the CALLBACK_COLOR_REACHED callback.
|
161
|
+
# Sets the thresholds for the CALLBACK_COLOR_REACHED callback.
|
162
162
|
#
|
163
163
|
# The following options are possible:
|
164
164
|
#
|
@@ -280,8 +280,8 @@ module Tinkerforge
|
|
280
280
|
# Sets the period in ms with which the CALLBACK_ILLUMINANCE callback is triggered
|
281
281
|
# periodically. A value of 0 turns the callback off.
|
282
282
|
#
|
283
|
-
# CALLBACK_ILLUMINANCE is only triggered if the illuminance has changed
|
284
|
-
# last triggering.
|
283
|
+
# The CALLBACK_ILLUMINANCE callback is only triggered if the illuminance has changed
|
284
|
+
# since the last triggering.
|
285
285
|
#
|
286
286
|
# The default value is 0.
|
287
287
|
def set_illuminance_callback_period(period)
|
@@ -293,11 +293,11 @@ module Tinkerforge
|
|
293
293
|
send_request(FUNCTION_GET_ILLUMINANCE_CALLBACK_PERIOD, [], '', 4, 'L')
|
294
294
|
end
|
295
295
|
|
296
|
-
# Sets the period in ms with which the CALLBACK_COLOR_TEMPERATURE callback is
|
297
|
-
# periodically. A value of 0 turns the callback off.
|
296
|
+
# Sets the period in ms with which the CALLBACK_COLOR_TEMPERATURE callback is
|
297
|
+
# triggered periodically. A value of 0 turns the callback off.
|
298
298
|
#
|
299
|
-
# CALLBACK_COLOR_TEMPERATURE is only triggered if the color temperature
|
300
|
-
# last triggering.
|
299
|
+
# The CALLBACK_COLOR_TEMPERATURE callback is only triggered if the color temperature
|
300
|
+
# has changed since the last triggering.
|
301
301
|
#
|
302
302
|
# The default value is 0.
|
303
303
|
def set_color_temperature_callback_period(period)
|
@@ -309,7 +309,7 @@ module Tinkerforge
|
|
309
309
|
send_request(FUNCTION_GET_COLOR_TEMPERATURE_CALLBACK_PERIOD, [], '', 4, 'L')
|
310
310
|
end
|
311
311
|
|
312
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
312
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
313
313
|
# the position, the hardware and firmware version as well as the
|
314
314
|
# device identifier.
|
315
315
|
#
|