tinkerforge 2.1.11 → 2.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 #
|
|
@@ -16,11 +16,11 @@ module Tinkerforge
|
|
|
16
16
|
DEVICE_DISPLAY_NAME = 'Dust Detector Bricklet' # :nodoc:
|
|
17
17
|
|
|
18
18
|
# This callback is triggered periodically with the period that is set by
|
|
19
|
-
# BrickletDustDetector#set_dust_density_callback_period. The parameter is the
|
|
19
|
+
# BrickletDustDetector#set_dust_density_callback_period. The parameter is the
|
|
20
20
|
# dust density of the sensor.
|
|
21
21
|
#
|
|
22
|
-
# CALLBACK_DUST_DENSITY is only triggered if the dust density value has
|
|
23
|
-
# last triggering.
|
|
22
|
+
# Der CALLBACK_DUST_DENSITY callback is only triggered if the dust density value has
|
|
23
|
+
# changed since the last triggering.
|
|
24
24
|
CALLBACK_DUST_DENSITY = 8
|
|
25
25
|
|
|
26
26
|
# This callback is triggered when the threshold as set by
|
|
@@ -74,8 +74,8 @@ module Tinkerforge
|
|
|
74
74
|
|
|
75
75
|
# Returns the dust density in µg/m³.
|
|
76
76
|
#
|
|
77
|
-
# If you want to get the dust density periodically, it is recommended
|
|
78
|
-
# to use the callback
|
|
77
|
+
# If you want to get the dust density periodically, it is recommended
|
|
78
|
+
# to use the CALLBACK_DUST_DENSITY callback and set the period with
|
|
79
79
|
# BrickletDustDetector#set_dust_density_callback_period.
|
|
80
80
|
def get_dust_density
|
|
81
81
|
send_request(FUNCTION_GET_DUST_DENSITY, [], '', 2, 'S')
|
|
@@ -84,8 +84,8 @@ module Tinkerforge
|
|
|
84
84
|
# Sets the period in ms with which the CALLBACK_DUST_DENSITY callback is triggered
|
|
85
85
|
# periodically. A value of 0 turns the callback off.
|
|
86
86
|
#
|
|
87
|
-
# CALLBACK_DUST_DENSITY is only triggered if the dust density has
|
|
88
|
-
# last triggering.
|
|
87
|
+
# The CALLBACK_DUST_DENSITY callback is only triggered if the dust density has
|
|
88
|
+
# changed since the last triggering.
|
|
89
89
|
#
|
|
90
90
|
# The default value is 0.
|
|
91
91
|
def set_dust_density_callback_period(period)
|
|
@@ -97,7 +97,7 @@ module Tinkerforge
|
|
|
97
97
|
send_request(FUNCTION_GET_DUST_DENSITY_CALLBACK_PERIOD, [], '', 4, 'L')
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
# Sets the thresholds for the CALLBACK_DUST_DENSITY_REACHED callback.
|
|
100
|
+
# Sets the thresholds for the CALLBACK_DUST_DENSITY_REACHED callback.
|
|
101
101
|
#
|
|
102
102
|
# The following options are possible:
|
|
103
103
|
#
|
|
@@ -157,7 +157,7 @@ module Tinkerforge
|
|
|
157
157
|
send_request(FUNCTION_GET_MOVING_AVERAGE, [], '', 1, 'C')
|
|
158
158
|
end
|
|
159
159
|
|
|
160
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
160
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
161
161
|
# the position, the hardware and firmware version as well as the
|
|
162
162
|
# device identifier.
|
|
163
163
|
#
|
|
@@ -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,8 +19,8 @@ module Tinkerforge
|
|
|
19
19
|
# BrickletGPS#set_coordinates_callback_period. The parameters are the same
|
|
20
20
|
# as for BrickletGPS#get_coordinates.
|
|
21
21
|
#
|
|
22
|
-
# CALLBACK_COORDINATES is only triggered if the coordinates changed
|
|
23
|
-
# last triggering and if there is currently a fix as indicated by
|
|
22
|
+
# The CALLBACK_COORDINATES callback is only triggered if the coordinates changed
|
|
23
|
+
# since the last triggering and if there is currently a fix as indicated by
|
|
24
24
|
# BrickletGPS#get_status.
|
|
25
25
|
CALLBACK_COORDINATES = 17
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ module Tinkerforge
|
|
|
28
28
|
# BrickletGPS#set_status_callback_period. The parameters are the same
|
|
29
29
|
# as for BrickletGPS#get_status.
|
|
30
30
|
#
|
|
31
|
-
# CALLBACK_STATUS is only triggered if the status changed since the
|
|
31
|
+
# The CALLBACK_STATUS callback is only triggered if the status changed since the
|
|
32
32
|
# last triggering.
|
|
33
33
|
CALLBACK_STATUS = 18
|
|
34
34
|
|
|
@@ -36,8 +36,8 @@ module Tinkerforge
|
|
|
36
36
|
# BrickletGPS#set_altitude_callback_period. The parameters are the same
|
|
37
37
|
# as for BrickletGPS#get_altitude.
|
|
38
38
|
#
|
|
39
|
-
# CALLBACK_ALTITUDE is only triggered if the altitude changed since
|
|
40
|
-
# last triggering and if there is currently a fix as indicated by
|
|
39
|
+
# The CALLBACK_ALTITUDE callback is only triggered if the altitude changed since
|
|
40
|
+
# the last triggering and if there is currently a fix as indicated by
|
|
41
41
|
# BrickletGPS#get_status.
|
|
42
42
|
CALLBACK_ALTITUDE = 19
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ module Tinkerforge
|
|
|
45
45
|
# BrickletGPS#set_motion_callback_period. The parameters are the same
|
|
46
46
|
# as for BrickletGPS#get_motion.
|
|
47
47
|
#
|
|
48
|
-
# CALLBACK_MOTION is only triggered if the motion changed since the
|
|
48
|
+
# The CALLBACK_MOTION callback is only triggered if the motion changed since the
|
|
49
49
|
# last triggering and if there is currently a fix as indicated by
|
|
50
50
|
# BrickletGPS#get_status.
|
|
51
51
|
CALLBACK_MOTION = 20
|
|
@@ -54,8 +54,8 @@ module Tinkerforge
|
|
|
54
54
|
# BrickletGPS#set_date_time_callback_period. The parameters are the same
|
|
55
55
|
# as for BrickletGPS#get_date_time.
|
|
56
56
|
#
|
|
57
|
-
# CALLBACK_DATE_TIME is only triggered if the date or time changed
|
|
58
|
-
# last triggering.
|
|
57
|
+
# The CALLBACK_DATE_TIME callback is only triggered if the date or time changed
|
|
58
|
+
# since the last triggering.
|
|
59
59
|
CALLBACK_DATE_TIME = 21
|
|
60
60
|
|
|
61
61
|
FUNCTION_GET_COORDINATES = 1 # :nodoc:
|
|
@@ -128,8 +128,8 @@ module Tinkerforge
|
|
|
128
128
|
# and 'W' (north, south, east and west).
|
|
129
129
|
#
|
|
130
130
|
# PDOP, HDOP and VDOP are the dilution of precision (DOP) values. They specify
|
|
131
|
-
# the additional multiplicative effect of GPS satellite geometry on GPS
|
|
132
|
-
# precision. See
|
|
131
|
+
# the additional multiplicative effect of GPS satellite geometry on GPS
|
|
132
|
+
# precision. See
|
|
133
133
|
# `here <https://en.wikipedia.org/wiki/Dilution_of_precision_(GPS)>`__
|
|
134
134
|
# for more information. The values are give in hundredths.
|
|
135
135
|
#
|
|
@@ -206,8 +206,8 @@ module Tinkerforge
|
|
|
206
206
|
# Sets the period in ms with which the CALLBACK_COORDINATES callback is triggered
|
|
207
207
|
# periodically. A value of 0 turns the callback off.
|
|
208
208
|
#
|
|
209
|
-
# CALLBACK_COORDINATES is only triggered if the coordinates changed
|
|
210
|
-
# last triggering.
|
|
209
|
+
# The CALLBACK_COORDINATES callback is only triggered if the coordinates changed
|
|
210
|
+
# since the last triggering.
|
|
211
211
|
#
|
|
212
212
|
# The default value is 0.
|
|
213
213
|
def set_coordinates_callback_period(period)
|
|
@@ -222,7 +222,7 @@ module Tinkerforge
|
|
|
222
222
|
# Sets the period in ms with which the CALLBACK_STATUS callback is triggered
|
|
223
223
|
# periodically. A value of 0 turns the callback off.
|
|
224
224
|
#
|
|
225
|
-
# CALLBACK_STATUS is only triggered if the status changed since the
|
|
225
|
+
# The CALLBACK_STATUS callback is only triggered if the status changed since the
|
|
226
226
|
# last triggering.
|
|
227
227
|
#
|
|
228
228
|
# The default value is 0.
|
|
@@ -238,8 +238,8 @@ module Tinkerforge
|
|
|
238
238
|
# Sets the period in ms with which the CALLBACK_ALTITUDE callback is triggered
|
|
239
239
|
# periodically. A value of 0 turns the callback off.
|
|
240
240
|
#
|
|
241
|
-
# CALLBACK_ALTITUDE is only triggered if the altitude changed since
|
|
242
|
-
# last triggering.
|
|
241
|
+
# The CALLBACK_ALTITUDE callback is only triggered if the altitude changed since
|
|
242
|
+
# the last triggering.
|
|
243
243
|
#
|
|
244
244
|
# The default value is 0.
|
|
245
245
|
def set_altitude_callback_period(period)
|
|
@@ -254,7 +254,7 @@ module Tinkerforge
|
|
|
254
254
|
# Sets the period in ms with which the CALLBACK_MOTION callback is triggered
|
|
255
255
|
# periodically. A value of 0 turns the callback off.
|
|
256
256
|
#
|
|
257
|
-
# CALLBACK_MOTION is only triggered if the motion changed since the
|
|
257
|
+
# The CALLBACK_MOTION callback is only triggered if the motion changed since the
|
|
258
258
|
# last triggering.
|
|
259
259
|
#
|
|
260
260
|
# The default value is 0.
|
|
@@ -270,8 +270,8 @@ module Tinkerforge
|
|
|
270
270
|
# Sets the period in ms with which the CALLBACK_DATE_TIME callback is triggered
|
|
271
271
|
# periodically. A value of 0 turns the callback off.
|
|
272
272
|
#
|
|
273
|
-
# CALLBACK_DATE_TIME is only triggered if the date or time changed
|
|
274
|
-
# last triggering.
|
|
273
|
+
# The CALLBACK_DATE_TIME callback is only triggered if the date or time changed
|
|
274
|
+
# since the last triggering.
|
|
275
275
|
#
|
|
276
276
|
# The default value is 0.
|
|
277
277
|
def set_date_time_callback_period(period)
|
|
@@ -283,7 +283,7 @@ module Tinkerforge
|
|
|
283
283
|
send_request(FUNCTION_GET_DATE_TIME_CALLBACK_PERIOD, [], '', 4, 'L')
|
|
284
284
|
end
|
|
285
285
|
|
|
286
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
286
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
287
287
|
# the position, the hardware and firmware version as well as the
|
|
288
288
|
# device identifier.
|
|
289
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 #
|
|
@@ -17,10 +17,11 @@ module Tinkerforge
|
|
|
17
17
|
|
|
18
18
|
# This callback is triggered periodically with the period that is set by
|
|
19
19
|
# BrickletHallEffect#set_edge_count_callback_period. The parameters are the
|
|
20
|
-
# current count and the current value (see BrickletHallEffect#get_value and
|
|
20
|
+
# current count and the current value (see BrickletHallEffect#get_value and
|
|
21
|
+
# BrickletHallEffect#get_edge_count).
|
|
21
22
|
#
|
|
22
|
-
# CALLBACK_EDGE_COUNT is only triggered if the count or value changed
|
|
23
|
-
# last triggering.
|
|
23
|
+
# The CALLBACK_EDGE_COUNT callback is only triggered if the count or value changed
|
|
24
|
+
# since the last triggering.
|
|
24
25
|
CALLBACK_EDGE_COUNT = 10
|
|
25
26
|
|
|
26
27
|
FUNCTION_GET_VALUE = 1 # :nodoc:
|
|
@@ -75,7 +76,7 @@ module Tinkerforge
|
|
|
75
76
|
send_request(FUNCTION_GET_EDGE_COUNT, [reset_counter], '?', 4, 'L')
|
|
76
77
|
end
|
|
77
78
|
|
|
78
|
-
# The edge type parameter configures if rising edges, falling edges or
|
|
79
|
+
# The edge type parameter configures if rising edges, falling edges or
|
|
79
80
|
# both are counted. Possible edge types are:
|
|
80
81
|
#
|
|
81
82
|
# * 0 = rising (default)
|
|
@@ -124,8 +125,8 @@ module Tinkerforge
|
|
|
124
125
|
# Sets the period in ms with which the CALLBACK_EDGE_COUNT callback is triggered
|
|
125
126
|
# periodically. A value of 0 turns the callback off.
|
|
126
127
|
#
|
|
127
|
-
# CALLBACK_EDGE_COUNT is only triggered if the edge count has changed
|
|
128
|
-
# last triggering.
|
|
128
|
+
# The CALLBACK_EDGE_COUNT callback is only triggered if the edge count has changed
|
|
129
|
+
# since the last triggering.
|
|
129
130
|
#
|
|
130
131
|
# The default value is 0.
|
|
131
132
|
def set_edge_count_callback_period(period)
|
|
@@ -139,12 +140,13 @@ module Tinkerforge
|
|
|
139
140
|
|
|
140
141
|
# This callback is triggered every n-th count, as configured with
|
|
141
142
|
# BrickletHallEffect#set_edge_interrupt. The parameters are the
|
|
142
|
-
# current count and the current value (see BrickletHallEffect#get_value and
|
|
143
|
+
# current count and the current value (see BrickletHallEffect#get_value and
|
|
144
|
+
# BrickletHallEffect#get_edge_count).
|
|
143
145
|
def edge_interrupt
|
|
144
146
|
send_request(FUNCTION_EDGE_INTERRUPT, [], '', 5, 'L ?')
|
|
145
147
|
end
|
|
146
148
|
|
|
147
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
149
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
148
150
|
# the position, the hardware and firmware version as well as the
|
|
149
151
|
# device identifier.
|
|
150
152
|
#
|
|
@@ -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 = 'Humidity Bricklet' # :nodoc:
|
|
17
17
|
|
|
18
18
|
# This callback is triggered periodically with the period that is set by
|
|
19
|
-
# BrickletHumidity#set_humidity_callback_period. The parameter is the humidity of
|
|
20
|
-
# sensor.
|
|
19
|
+
# BrickletHumidity#set_humidity_callback_period. The parameter is the humidity of
|
|
20
|
+
# the sensor.
|
|
21
21
|
#
|
|
22
|
-
# CALLBACK_HUMIDITY is only triggered if the humidity has changed since
|
|
23
|
-
# last triggering.
|
|
22
|
+
# The CALLBACK_HUMIDITY callback is only triggered if the humidity has changed since
|
|
23
|
+
# the last triggering.
|
|
24
24
|
CALLBACK_HUMIDITY = 13
|
|
25
25
|
|
|
26
26
|
# This callback is triggered periodically with the period that is set by
|
|
27
|
-
# BrickletHumidity#set_analog_value_callback_period. The parameter is the analog
|
|
28
|
-
# sensor.
|
|
27
|
+
# BrickletHumidity#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 humidity has changed
|
|
31
|
-
# last triggering.
|
|
30
|
+
# The CALLBACK_ANALOG_VALUE callback is only triggered if the humidity has changed
|
|
31
|
+
# since the last triggering.
|
|
32
32
|
CALLBACK_ANALOG_VALUE = 14
|
|
33
33
|
|
|
34
34
|
# This callback is triggered when the threshold as set by
|
|
@@ -99,11 +99,11 @@ module Tinkerforge
|
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
# Returns the humidity of the sensor. The value
|
|
102
|
-
# has a range of 0 to 1000 and is given in %RH/10 (Relative Humidity),
|
|
102
|
+
# has a range of 0 to 1000 and is given in %RH/10 (Relative Humidity),
|
|
103
103
|
# i.e. a value of 421 means that a humidity of 42.1 %RH is measured.
|
|
104
104
|
#
|
|
105
105
|
# If you want to get the humidity periodically, it is recommended to use the
|
|
106
|
-
# callback
|
|
106
|
+
# CALLBACK_HUMIDITY callback and set the period with
|
|
107
107
|
# BrickletHumidity#set_humidity_callback_period.
|
|
108
108
|
def get_humidity
|
|
109
109
|
send_request(FUNCTION_GET_HUMIDITY, [], '', 2, 'S')
|
|
@@ -121,8 +121,8 @@ module Tinkerforge
|
|
|
121
121
|
# the analog value yourself. See the `HIH 5030 datasheet
|
|
122
122
|
# <https://github.com/Tinkerforge/humidity-bricklet/raw/master/datasheets/hih-5030.pdf>`__.
|
|
123
123
|
#
|
|
124
|
-
# If you want the analog value periodically, it is recommended to use the
|
|
125
|
-
# callback
|
|
124
|
+
# If you want the analog value periodically, it is recommended to use the
|
|
125
|
+
# CALLBACK_ANALOG_VALUE callback and set the period with
|
|
126
126
|
# BrickletHumidity#set_analog_value_callback_period.
|
|
127
127
|
def get_analog_value
|
|
128
128
|
send_request(FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S')
|
|
@@ -131,8 +131,8 @@ module Tinkerforge
|
|
|
131
131
|
# Sets the period in ms with which the CALLBACK_HUMIDITY callback is triggered
|
|
132
132
|
# periodically. A value of 0 turns the callback off.
|
|
133
133
|
#
|
|
134
|
-
# CALLBACK_HUMIDITY is only triggered if the humidity has changed
|
|
135
|
-
# last triggering.
|
|
134
|
+
# The CALLBACK_HUMIDITY callback is only triggered if the humidity has changed
|
|
135
|
+
# since the last triggering.
|
|
136
136
|
#
|
|
137
137
|
# The default value is 0.
|
|
138
138
|
def set_humidity_callback_period(period)
|
|
@@ -147,8 +147,8 @@ module Tinkerforge
|
|
|
147
147
|
# Sets the period in ms with which the CALLBACK_ANALOG_VALUE callback is triggered
|
|
148
148
|
# periodically. A value of 0 turns the callback off.
|
|
149
149
|
#
|
|
150
|
-
# CALLBACK_ANALOG_VALUE is only triggered if the analog value has
|
|
151
|
-
# last triggering.
|
|
150
|
+
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
|
151
|
+
# changed since the last triggering.
|
|
152
152
|
#
|
|
153
153
|
# The default value is 0.
|
|
154
154
|
def set_analog_value_callback_period(period)
|
|
@@ -160,7 +160,7 @@ module Tinkerforge
|
|
|
160
160
|
send_request(FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD, [], '', 4, 'L')
|
|
161
161
|
end
|
|
162
162
|
|
|
163
|
-
# Sets the thresholds for the CALLBACK_HUMIDITY_REACHED callback.
|
|
163
|
+
# Sets the thresholds for the CALLBACK_HUMIDITY_REACHED callback.
|
|
164
164
|
#
|
|
165
165
|
# The following options are possible:
|
|
166
166
|
#
|
|
@@ -182,7 +182,7 @@ module Tinkerforge
|
|
|
182
182
|
send_request(FUNCTION_GET_HUMIDITY_CALLBACK_THRESHOLD, [], '', 5, 'k S S')
|
|
183
183
|
end
|
|
184
184
|
|
|
185
|
-
# Sets the thresholds for the CALLBACK_ANALOG_VALUE_REACHED callback.
|
|
185
|
+
# Sets the thresholds for the CALLBACK_ANALOG_VALUE_REACHED callback.
|
|
186
186
|
#
|
|
187
187
|
# The following options are possible:
|
|
188
188
|
#
|
|
@@ -226,7 +226,7 @@ module Tinkerforge
|
|
|
226
226
|
send_request(FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L')
|
|
227
227
|
end
|
|
228
228
|
|
|
229
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
229
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
230
230
|
# the position, the hardware and firmware version as well as the
|
|
231
231
|
# device identifier.
|
|
232
232
|
#
|
|
@@ -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 #
|
|
@@ -121,7 +121,7 @@ module Tinkerforge
|
|
|
121
121
|
send_request(FUNCTION_GET_CONFIGURATION, [], '', 2, 'C C')
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
124
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
125
125
|
# the position, the hardware and firmware version as well as the
|
|
126
126
|
# device identifier.
|
|
127
127
|
#
|
|
@@ -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 #
|
|
@@ -145,7 +145,7 @@ module Tinkerforge
|
|
|
145
145
|
#
|
|
146
146
|
# The interrupts use the grouping as set by BrickletIndustrialDigitalIn4#set_group.
|
|
147
147
|
#
|
|
148
|
-
# The interrupt is delivered with the callback
|
|
148
|
+
# The interrupt is delivered with the CALLBACK_INTERRUPT callback.
|
|
149
149
|
def set_interrupt(interrupt_mask)
|
|
150
150
|
send_request(FUNCTION_SET_INTERRUPT, [interrupt_mask], 'S', 0, '')
|
|
151
151
|
end
|
|
@@ -198,7 +198,7 @@ module Tinkerforge
|
|
|
198
198
|
send_request(FUNCTION_GET_EDGE_COUNT_CONFIG, [pin], 'C', 2, 'C C')
|
|
199
199
|
end
|
|
200
200
|
|
|
201
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
201
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
202
202
|
# the position, the hardware and firmware version as well as the
|
|
203
203
|
# device identifier.
|
|
204
204
|
#
|
|
@@ -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 #
|
|
@@ -136,7 +136,7 @@ module Tinkerforge
|
|
|
136
136
|
end
|
|
137
137
|
|
|
138
138
|
# Sets the output value with a bitmask, according to the selection mask.
|
|
139
|
-
# The bitmask is 16 bit long, *true* refers to high and *false* refers to
|
|
139
|
+
# The bitmask is 16 bit long, *true* refers to high and *false* refers to
|
|
140
140
|
# low.
|
|
141
141
|
#
|
|
142
142
|
# For example: The values (3, 1) or (0b0011, 0b0001) will turn pin 0 high, pin 1
|
|
@@ -152,7 +152,7 @@ module Tinkerforge
|
|
|
152
152
|
send_request(FUNCTION_SET_SELECTED_VALUES, [selection_mask, value_mask], 'S S', 0, '')
|
|
153
153
|
end
|
|
154
154
|
|
|
155
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
155
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
156
156
|
# the position, the hardware and firmware version as well as the
|
|
157
157
|
# device identifier.
|
|
158
158
|
#
|
|
@@ -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
|
# BrickletIndustrialDual020mA#set_current_callback_period. The parameter is the current of the
|
|
20
20
|
# sensor.
|
|
21
21
|
#
|
|
22
|
-
# CALLBACK_CURRENT is only triggered if the current has changed since the
|
|
22
|
+
# The CALLBACK_CURRENT callback is only triggered if the current has changed since the
|
|
23
23
|
# last triggering.
|
|
24
24
|
CALLBACK_CURRENT = 10
|
|
25
25
|
|
|
@@ -87,7 +87,7 @@ module Tinkerforge
|
|
|
87
87
|
# be a short circuit or the sensor may be defect.
|
|
88
88
|
#
|
|
89
89
|
# If you want to get the current periodically, it is recommended to use the
|
|
90
|
-
# callback
|
|
90
|
+
# CALLBACK_CURRENT callback and set the period with
|
|
91
91
|
# BrickletIndustrialDual020mA#set_current_callback_period.
|
|
92
92
|
def get_current(sensor)
|
|
93
93
|
send_request(FUNCTION_GET_CURRENT, [sensor], 'C', 4, 'l')
|
|
@@ -96,7 +96,7 @@ module Tinkerforge
|
|
|
96
96
|
# Sets the period in ms with which the CALLBACK_CURRENT callback is triggered
|
|
97
97
|
# periodically for the given sensor. A value of 0 turns the callback off.
|
|
98
98
|
#
|
|
99
|
-
# CALLBACK_CURRENT is only triggered if the current has changed since the
|
|
99
|
+
# The CALLBACK_CURRENT callback is only triggered if the current has changed since the
|
|
100
100
|
# last triggering.
|
|
101
101
|
#
|
|
102
102
|
# The default value is 0.
|
|
@@ -172,7 +172,7 @@ module Tinkerforge
|
|
|
172
172
|
send_request(FUNCTION_GET_SAMPLE_RATE, [], '', 1, 'C')
|
|
173
173
|
end
|
|
174
174
|
|
|
175
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
175
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
176
176
|
# the position, the hardware and firmware version as well as the
|
|
177
177
|
# device identifier.
|
|
178
178
|
#
|