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 = 'Temperature Bricklet' # :nodoc:
|
|
17
17
|
|
|
18
18
|
# This callback is triggered periodically with the period that is set by
|
|
19
|
-
# BrickletTemperature#set_temperature_callback_period. The parameter is the
|
|
20
|
-
# of the sensor.
|
|
19
|
+
# BrickletTemperature#set_temperature_callback_period. The parameter is the
|
|
20
|
+
# temperature of the sensor.
|
|
21
21
|
#
|
|
22
|
-
# CALLBACK_TEMPERATURE is only triggered if the temperature has changed
|
|
23
|
-
# last triggering.
|
|
22
|
+
# The CALLBACK_TEMPERATURE callback is only triggered if the temperature has changed
|
|
23
|
+
# since the last triggering.
|
|
24
24
|
CALLBACK_TEMPERATURE = 8
|
|
25
25
|
|
|
26
26
|
# This callback is triggered when the threshold as set by
|
|
@@ -78,8 +78,8 @@ module Tinkerforge
|
|
|
78
78
|
# has a range of -2500 to 8500 and is given in °C/100,
|
|
79
79
|
# e.g. a value of 4223 means that a temperature of 42.23 °C is measured.
|
|
80
80
|
#
|
|
81
|
-
# If you want to get the temperature periodically, it is recommended
|
|
82
|
-
# to use the callback
|
|
81
|
+
# If you want to get the temperature periodically, it is recommended
|
|
82
|
+
# to use the CALLBACK_TEMPERATURE callback and set the period with
|
|
83
83
|
# BrickletTemperature#set_temperature_callback_period.
|
|
84
84
|
def get_temperature
|
|
85
85
|
send_request(FUNCTION_GET_TEMPERATURE, [], '', 2, 's')
|
|
@@ -88,8 +88,8 @@ module Tinkerforge
|
|
|
88
88
|
# Sets the period in ms with which the CALLBACK_TEMPERATURE callback is triggered
|
|
89
89
|
# periodically. A value of 0 turns the callback off.
|
|
90
90
|
#
|
|
91
|
-
# CALLBACK_TEMPERATURE is only triggered if the temperature has changed
|
|
92
|
-
# last triggering.
|
|
91
|
+
# The CALLBACK_TEMPERATURE callback is only triggered if the temperature has changed
|
|
92
|
+
# since the last triggering.
|
|
93
93
|
#
|
|
94
94
|
# The default value is 0.
|
|
95
95
|
def set_temperature_callback_period(period)
|
|
@@ -101,7 +101,7 @@ module Tinkerforge
|
|
|
101
101
|
send_request(FUNCTION_GET_TEMPERATURE_CALLBACK_PERIOD, [], '', 4, 'L')
|
|
102
102
|
end
|
|
103
103
|
|
|
104
|
-
# Sets the thresholds for the CALLBACK_TEMPERATURE_REACHED callback.
|
|
104
|
+
# Sets the thresholds for the CALLBACK_TEMPERATURE_REACHED callback.
|
|
105
105
|
#
|
|
106
106
|
# The following options are possible:
|
|
107
107
|
#
|
|
@@ -167,7 +167,7 @@ module Tinkerforge
|
|
|
167
167
|
send_request(FUNCTION_GET_I2C_MODE, [], '', 1, 'C')
|
|
168
168
|
end
|
|
169
169
|
|
|
170
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
170
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
171
171
|
# the position, the hardware and firmware version as well as the
|
|
172
172
|
# device identifier.
|
|
173
173
|
#
|
|
@@ -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 = 'Temperature IR Bricklet' # :nodoc:
|
|
17
17
|
|
|
18
18
|
# This callback is triggered periodically with the period that is set by
|
|
19
|
-
# BrickletTemperatureIR#set_ambient_temperature_callback_period. The parameter is the
|
|
20
|
-
# temperature of the sensor.
|
|
19
|
+
# BrickletTemperatureIR#set_ambient_temperature_callback_period. The parameter is the
|
|
20
|
+
# ambient temperature of the sensor.
|
|
21
21
|
#
|
|
22
|
-
# CALLBACK_AMBIENT_TEMPERATURE is only triggered if the ambient
|
|
23
|
-
# has changed since the last triggering.
|
|
22
|
+
# The CALLBACK_AMBIENT_TEMPERATURE callback is only triggered if the ambient
|
|
23
|
+
# temperature has changed since the last triggering.
|
|
24
24
|
CALLBACK_AMBIENT_TEMPERATURE = 15
|
|
25
25
|
|
|
26
26
|
# This callback is triggered periodically with the period that is set by
|
|
27
|
-
# BrickletTemperatureIR#set_object_temperature_callback_period. The parameter is the
|
|
28
|
-
# temperature of the sensor.
|
|
27
|
+
# BrickletTemperatureIR#set_object_temperature_callback_period. The parameter is the
|
|
28
|
+
# object temperature of the sensor.
|
|
29
29
|
#
|
|
30
|
-
# CALLBACK_OBJECT_TEMPERATURE is only triggered if the object
|
|
31
|
-
# has changed since the last triggering.
|
|
30
|
+
# The CALLBACK_OBJECT_TEMPERATURE callback is only triggered if the object
|
|
31
|
+
# temperature has changed since the last triggering.
|
|
32
32
|
CALLBACK_OBJECT_TEMPERATURE = 16
|
|
33
33
|
|
|
34
34
|
# This callback is triggered when the threshold as set by
|
|
@@ -104,11 +104,11 @@ module Tinkerforge
|
|
|
104
104
|
|
|
105
105
|
# Returns the ambient temperature of the sensor. The value
|
|
106
106
|
# has a range of -400 to 1250 and is given in °C/10,
|
|
107
|
-
# e.g. a value of 423 means that an ambient temperature of 42.3 °C is
|
|
107
|
+
# e.g. a value of 423 means that an ambient temperature of 42.3 °C is
|
|
108
108
|
# measured.
|
|
109
109
|
#
|
|
110
|
-
# If you want to get the ambient temperature periodically, it is recommended
|
|
111
|
-
# to use the callback
|
|
110
|
+
# If you want to get the ambient temperature periodically, it is recommended
|
|
111
|
+
# to use the CALLBACK_AMBIENT_TEMPERATURE callback and set the period with
|
|
112
112
|
# BrickletTemperatureIR#set_ambient_temperature_callback_period.
|
|
113
113
|
def get_ambient_temperature
|
|
114
114
|
send_request(FUNCTION_GET_AMBIENT_TEMPERATURE, [], '', 2, 's')
|
|
@@ -120,23 +120,23 @@ module Tinkerforge
|
|
|
120
120
|
# e.g. a value of 3001 means that a temperature of 300.1 °C is measured
|
|
121
121
|
# on the surface of the object.
|
|
122
122
|
#
|
|
123
|
-
# The temperature of different materials is dependent on their `emissivity
|
|
123
|
+
# The temperature of different materials is dependent on their `emissivity
|
|
124
124
|
# <https://en.wikipedia.org/wiki/Emissivity>`__. The emissivity of the material
|
|
125
125
|
# can be set with BrickletTemperatureIR#set_emissivity.
|
|
126
126
|
#
|
|
127
|
-
# If you want to get the object temperature periodically, it is recommended
|
|
128
|
-
# to use the callback
|
|
127
|
+
# If you want to get the object temperature periodically, it is recommended
|
|
128
|
+
# to use the CALLBACK_OBJECT_TEMPERATURE callback and set the period with
|
|
129
129
|
# BrickletTemperatureIR#set_object_temperature_callback_period.
|
|
130
130
|
def get_object_temperature
|
|
131
131
|
send_request(FUNCTION_GET_OBJECT_TEMPERATURE, [], '', 2, 's')
|
|
132
132
|
end
|
|
133
133
|
|
|
134
134
|
# Sets the `emissivity <https://en.wikipedia.org/wiki/Emissivity>`__ that is
|
|
135
|
-
# used to calculate the surface temperature as returned by
|
|
136
|
-
# BrickletTemperatureIR#get_object_temperature.
|
|
135
|
+
# used to calculate the surface temperature as returned by
|
|
136
|
+
# BrickletTemperatureIR#get_object_temperature.
|
|
137
137
|
#
|
|
138
138
|
# The emissivity is usually given as a value between 0.0 and 1.0. A list of
|
|
139
|
-
# emissivities of different materials can be found
|
|
139
|
+
# emissivities of different materials can be found
|
|
140
140
|
# `here <http://www.infrared-thermography.com/material.htm>`__.
|
|
141
141
|
#
|
|
142
142
|
# The parameter of BrickletTemperatureIR#set_emissivity has to be given with a factor of
|
|
@@ -158,11 +158,11 @@ module Tinkerforge
|
|
|
158
158
|
send_request(FUNCTION_GET_EMISSIVITY, [], '', 2, 'S')
|
|
159
159
|
end
|
|
160
160
|
|
|
161
|
-
# Sets the period in ms with which the CALLBACK_AMBIENT_TEMPERATURE callback is
|
|
162
|
-
# periodically. A value of 0 turns the callback off.
|
|
161
|
+
# Sets the period in ms with which the CALLBACK_AMBIENT_TEMPERATURE callback is
|
|
162
|
+
# triggered periodically. A value of 0 turns the callback off.
|
|
163
163
|
#
|
|
164
|
-
# CALLBACK_AMBIENT_TEMPERATURE is only triggered if the temperature has
|
|
165
|
-
# last triggering.
|
|
164
|
+
# The CALLBACK_AMBIENT_TEMPERATURE callback is only triggered if the temperature has
|
|
165
|
+
# changed since the last triggering.
|
|
166
166
|
#
|
|
167
167
|
# The default value is 0.
|
|
168
168
|
def set_ambient_temperature_callback_period(period)
|
|
@@ -174,11 +174,11 @@ module Tinkerforge
|
|
|
174
174
|
send_request(FUNCTION_GET_AMBIENT_TEMPERATURE_CALLBACK_PERIOD, [], '', 4, 'L')
|
|
175
175
|
end
|
|
176
176
|
|
|
177
|
-
# Sets the period in ms with which the CALLBACK_OBJECT_TEMPERATURE callback is
|
|
178
|
-
# periodically. A value of 0 turns the callback off.
|
|
177
|
+
# Sets the period in ms with which the CALLBACK_OBJECT_TEMPERATURE callback is
|
|
178
|
+
# triggered periodically. A value of 0 turns the callback off.
|
|
179
179
|
#
|
|
180
|
-
# CALLBACK_OBJECT_TEMPERATURE is only triggered if the temperature
|
|
181
|
-
# last triggering.
|
|
180
|
+
# The CALLBACK_OBJECT_TEMPERATURE callback is only triggered if the temperature
|
|
181
|
+
# has changed since the last triggering.
|
|
182
182
|
#
|
|
183
183
|
# The default value is 0.
|
|
184
184
|
def set_object_temperature_callback_period(period)
|
|
@@ -190,7 +190,7 @@ module Tinkerforge
|
|
|
190
190
|
send_request(FUNCTION_GET_OBJECT_TEMPERATURE_CALLBACK_PERIOD, [], '', 4, 'L')
|
|
191
191
|
end
|
|
192
192
|
|
|
193
|
-
# Sets the thresholds for the CALLBACK_AMBIENT_TEMPERATURE_REACHED callback.
|
|
193
|
+
# Sets the thresholds for the CALLBACK_AMBIENT_TEMPERATURE_REACHED callback.
|
|
194
194
|
#
|
|
195
195
|
# The following options are possible:
|
|
196
196
|
#
|
|
@@ -212,7 +212,7 @@ module Tinkerforge
|
|
|
212
212
|
send_request(FUNCTION_GET_AMBIENT_TEMPERATURE_CALLBACK_THRESHOLD, [], '', 5, 'k s s')
|
|
213
213
|
end
|
|
214
214
|
|
|
215
|
-
# Sets the thresholds for the CALLBACK_OBJECT_TEMPERATURE_REACHED callback.
|
|
215
|
+
# Sets the thresholds for the CALLBACK_OBJECT_TEMPERATURE_REACHED callback.
|
|
216
216
|
#
|
|
217
217
|
# The following options are possible:
|
|
218
218
|
#
|
|
@@ -256,7 +256,7 @@ module Tinkerforge
|
|
|
256
256
|
send_request(FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L')
|
|
257
257
|
end
|
|
258
258
|
|
|
259
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
259
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
260
260
|
# the position, the hardware and firmware version as well as the
|
|
261
261
|
# device identifier.
|
|
262
262
|
#
|
|
@@ -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 = 'Thermocouple Bricklet' # :nodoc:
|
|
17
17
|
|
|
18
18
|
# This callback is triggered periodically with the period that is set by
|
|
19
|
-
# BrickletThermocouple#set_temperature_callback_period. The parameter is the
|
|
20
|
-
# of the thermocouple.
|
|
19
|
+
# BrickletThermocouple#set_temperature_callback_period. The parameter is the
|
|
20
|
+
# temperature of the thermocouple.
|
|
21
21
|
#
|
|
22
|
-
# CALLBACK_TEMPERATURE is only triggered if the temperature has
|
|
23
|
-
# last triggering.
|
|
22
|
+
# The CALLBACK_TEMPERATURE callback is only triggered if the temperature has
|
|
23
|
+
# changed since the last triggering.
|
|
24
24
|
CALLBACK_TEMPERATURE = 8
|
|
25
25
|
|
|
26
26
|
# This callback is triggered when the threshold as set by
|
|
@@ -31,7 +31,7 @@ module Tinkerforge
|
|
|
31
31
|
# with the period as set by BrickletThermocouple#set_debounce_period.
|
|
32
32
|
CALLBACK_TEMPERATURE_REACHED = 9
|
|
33
33
|
|
|
34
|
-
# This Callback is triggered every time the error state changes
|
|
34
|
+
# This Callback is triggered every time the error state changes
|
|
35
35
|
# (see func:`GetErrorStatus`).
|
|
36
36
|
CALLBACK_ERROR_STATE = 13
|
|
37
37
|
|
|
@@ -100,8 +100,8 @@ module Tinkerforge
|
|
|
100
100
|
# Returns the temperature of the thermocouple. The value is given in °C/100,
|
|
101
101
|
# e.g. a value of 4223 means that a temperature of 42.23 °C is measured.
|
|
102
102
|
#
|
|
103
|
-
# If you want to get the temperature periodically, it is recommended
|
|
104
|
-
# to use the callback
|
|
103
|
+
# If you want to get the temperature periodically, it is recommended
|
|
104
|
+
# to use the CALLBACK_TEMPERATURE callback and set the period with
|
|
105
105
|
# BrickletThermocouple#set_temperature_callback_period.
|
|
106
106
|
def get_temperature
|
|
107
107
|
send_request(FUNCTION_GET_TEMPERATURE, [], '', 4, 'l')
|
|
@@ -110,8 +110,8 @@ module Tinkerforge
|
|
|
110
110
|
# Sets the period in ms with which the CALLBACK_TEMPERATURE callback is triggered
|
|
111
111
|
# periodically. A value of 0 turns the callback off.
|
|
112
112
|
#
|
|
113
|
-
# CALLBACK_TEMPERATURE is only triggered if the temperature has changed
|
|
114
|
-
# last triggering.
|
|
113
|
+
# The CALLBACK_TEMPERATURE callback is only triggered if the temperature has changed
|
|
114
|
+
# since the last triggering.
|
|
115
115
|
#
|
|
116
116
|
# The default value is 0.
|
|
117
117
|
def set_temperature_callback_period(period)
|
|
@@ -123,7 +123,7 @@ module Tinkerforge
|
|
|
123
123
|
send_request(FUNCTION_GET_TEMPERATURE_CALLBACK_PERIOD, [], '', 4, 'L')
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
-
# Sets the thresholds for the CALLBACK_TEMPERATURE_REACHED callback.
|
|
126
|
+
# Sets the thresholds for the CALLBACK_TEMPERATURE_REACHED callback.
|
|
127
127
|
#
|
|
128
128
|
# The following options are possible:
|
|
129
129
|
#
|
|
@@ -214,7 +214,7 @@ module Tinkerforge
|
|
|
214
214
|
send_request(FUNCTION_GET_ERROR_STATE, [], '', 2, '? ?')
|
|
215
215
|
end
|
|
216
216
|
|
|
217
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
217
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
218
218
|
# the position, the hardware and firmware version as well as the
|
|
219
219
|
# device identifier.
|
|
220
220
|
#
|
|
@@ -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 #
|
|
@@ -78,7 +78,7 @@ module Tinkerforge
|
|
|
78
78
|
send_request(FUNCTION_IS_TILT_STATE_CALLBACK_ENABLED, [], '', 1, '?')
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
81
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
82
82
|
# the position, the hardware and firmware version as well as the
|
|
83
83
|
# device identifier.
|
|
84
84
|
#
|
|
@@ -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 = 'UV Light Bricklet' # :nodoc:
|
|
17
17
|
|
|
18
18
|
# This callback is triggered periodically with the period that is set by
|
|
19
|
-
# BrickletUVLight#set_uv_light_callback_period. The parameter is the UV Light
|
|
19
|
+
# BrickletUVLight#set_uv_light_callback_period. The parameter is the UV Light
|
|
20
20
|
# intensity of the sensor.
|
|
21
21
|
#
|
|
22
|
-
# CALLBACK_UV_LIGHT is only triggered if the intensity has changed
|
|
23
|
-
# last triggering.
|
|
22
|
+
# The CALLBACK_UV_LIGHT callback is only triggered if the intensity has changed
|
|
23
|
+
# since the last triggering.
|
|
24
24
|
CALLBACK_UV_LIGHT = 8
|
|
25
25
|
|
|
26
26
|
# This callback is triggered when the threshold as set by
|
|
@@ -75,7 +75,7 @@ module Tinkerforge
|
|
|
75
75
|
# intensity of 500µW/cm² is equivalent to an UV Index of 2.
|
|
76
76
|
#
|
|
77
77
|
# If you want to get the intensity periodically, it is recommended to use the
|
|
78
|
-
# callback
|
|
78
|
+
# CALLBACK_UV_LIGHT callback and set the period with
|
|
79
79
|
# BrickletUVLight#set_uv_light_callback_period.
|
|
80
80
|
def get_uv_light
|
|
81
81
|
send_request(FUNCTION_GET_UV_LIGHT, [], '', 4, 'L')
|
|
@@ -84,8 +84,8 @@ module Tinkerforge
|
|
|
84
84
|
# Sets the period in ms with which the CALLBACK_UV_LIGHT callback is triggered
|
|
85
85
|
# periodically. A value of 0 turns the callback off.
|
|
86
86
|
#
|
|
87
|
-
# CALLBACK_UV_LIGHT is only triggered if the intensity has changed since
|
|
88
|
-
# last triggering.
|
|
87
|
+
# The CALLBACK_UV_LIGHT callback is only triggered if the intensity has changed since
|
|
88
|
+
# the last triggering.
|
|
89
89
|
#
|
|
90
90
|
# The default value is 0.
|
|
91
91
|
def set_uv_light_callback_period(period)
|
|
@@ -97,7 +97,7 @@ module Tinkerforge
|
|
|
97
97
|
send_request(FUNCTION_GET_UV_LIGHT_CALLBACK_PERIOD, [], '', 4, 'L')
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
# Sets the thresholds for the CALLBACK_UV_LIGHT_REACHED callback.
|
|
100
|
+
# Sets the thresholds for the CALLBACK_UV_LIGHT_REACHED callback.
|
|
101
101
|
#
|
|
102
102
|
# The following options are possible:
|
|
103
103
|
#
|
|
@@ -139,7 +139,7 @@ module Tinkerforge
|
|
|
139
139
|
send_request(FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L')
|
|
140
140
|
end
|
|
141
141
|
|
|
142
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
142
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
143
143
|
# the position, the hardware and firmware version as well as the
|
|
144
144
|
# device identifier.
|
|
145
145
|
#
|
|
@@ -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
|
# BrickletVoltage#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
|
+
# The CALLBACK_VOLTAGE callback is only triggered if the voltage has changed since
|
|
23
|
+
# the last triggering.
|
|
24
24
|
CALLBACK_VOLTAGE = 13
|
|
25
25
|
|
|
26
26
|
# This callback is triggered periodically with the period that is set by
|
|
27
|
-
# BrickletVoltage#set_analog_value_callback_period. The parameter is the
|
|
28
|
-
# sensor.
|
|
27
|
+
# BrickletVoltage#set_analog_value_callback_period. The parameter is the
|
|
28
|
+
# analog 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 = 14
|
|
33
33
|
|
|
34
34
|
# This callback is triggered when the threshold as set by
|
|
@@ -102,7 +102,7 @@ module Tinkerforge
|
|
|
102
102
|
# between 0mV and 50000mV.
|
|
103
103
|
#
|
|
104
104
|
# If you want to get the voltage periodically, it is recommended to use the
|
|
105
|
-
# callback
|
|
105
|
+
# CALLBACK_VOLTAGE callback and set the period with
|
|
106
106
|
# BrickletVoltage#set_voltage_callback_period.
|
|
107
107
|
def get_voltage
|
|
108
108
|
send_request(FUNCTION_GET_VOLTAGE, [], '', 2, 'S')
|
|
@@ -117,8 +117,8 @@ module Tinkerforge
|
|
|
117
117
|
# unfiltered analog values. The only reason to use BrickletVoltage#get_analog_value is,
|
|
118
118
|
# if you need the full resolution of the analog-to-digital converter.
|
|
119
119
|
#
|
|
120
|
-
# If you want the analog value periodically, it is recommended to use the
|
|
121
|
-
# callback
|
|
120
|
+
# If you want the analog value periodically, it is recommended to use the
|
|
121
|
+
# CALLBACK_ANALOG_VALUE callback and set the period with
|
|
122
122
|
# BrickletVoltage#set_analog_value_callback_period.
|
|
123
123
|
def get_analog_value
|
|
124
124
|
send_request(FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S')
|
|
@@ -127,8 +127,8 @@ module Tinkerforge
|
|
|
127
127
|
# Sets the period in ms with which the CALLBACK_VOLTAGE callback is triggered
|
|
128
128
|
# periodically. A value of 0 turns the callback off.
|
|
129
129
|
#
|
|
130
|
-
# CALLBACK_VOLTAGE is only triggered if the voltage has changed since
|
|
131
|
-
# last triggering.
|
|
130
|
+
# The CALLBACK_VOLTAGE callback is only triggered if the voltage has changed since
|
|
131
|
+
# the last triggering.
|
|
132
132
|
#
|
|
133
133
|
# The default value is 0.
|
|
134
134
|
def set_voltage_callback_period(period)
|
|
@@ -143,8 +143,8 @@ module Tinkerforge
|
|
|
143
143
|
# Sets the period in ms with which the CALLBACK_ANALOG_VALUE callback is triggered
|
|
144
144
|
# periodically. A value of 0 turns the callback off.
|
|
145
145
|
#
|
|
146
|
-
# CALLBACK_ANALOG_VALUE is only triggered if the analog value has
|
|
147
|
-
# last triggering.
|
|
146
|
+
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
|
147
|
+
# changed since the last triggering.
|
|
148
148
|
#
|
|
149
149
|
# The default value is 0.
|
|
150
150
|
def set_analog_value_callback_period(period)
|
|
@@ -156,7 +156,7 @@ module Tinkerforge
|
|
|
156
156
|
send_request(FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD, [], '', 4, 'L')
|
|
157
157
|
end
|
|
158
158
|
|
|
159
|
-
# Sets the thresholds for the CALLBACK_VOLTAGE_REACHED callback.
|
|
159
|
+
# Sets the thresholds for the CALLBACK_VOLTAGE_REACHED callback.
|
|
160
160
|
#
|
|
161
161
|
# The following options are possible:
|
|
162
162
|
#
|
|
@@ -178,7 +178,7 @@ module Tinkerforge
|
|
|
178
178
|
send_request(FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD, [], '', 5, 'k S S')
|
|
179
179
|
end
|
|
180
180
|
|
|
181
|
-
# Sets the thresholds for the CALLBACK_ANALOG_VALUE_REACHED callback.
|
|
181
|
+
# Sets the thresholds for the CALLBACK_ANALOG_VALUE_REACHED callback.
|
|
182
182
|
#
|
|
183
183
|
# The following options are possible:
|
|
184
184
|
#
|
|
@@ -222,7 +222,7 @@ module Tinkerforge
|
|
|
222
222
|
send_request(FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L')
|
|
223
223
|
end
|
|
224
224
|
|
|
225
|
-
# Returns the UID, the UID where the Bricklet is connected to,
|
|
225
|
+
# Returns the UID, the UID where the Bricklet is connected to,
|
|
226
226
|
# the position, the hardware and firmware version as well as the
|
|
227
227
|
# device identifier.
|
|
228
228
|
#
|