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 #
|
@@ -27,6 +27,8 @@ module Tinkerforge
|
|
27
27
|
# currently pin 0 is high and pins 1-3 are low.
|
28
28
|
# * (9, 14) or (0b1001, 0b1110) means that interrupts on pins 0 and 3
|
29
29
|
# occurred and currently pin 0 is low and pins 1-3 are high.
|
30
|
+
#
|
31
|
+
# The interrupts use the grouping as set by BrickletIndustrialDigitalIn4#set_group.
|
30
32
|
CALLBACK_INTERRUPT = 9
|
31
33
|
|
32
34
|
FUNCTION_GET_VALUE = 1 # :nodoc:
|
@@ -120,13 +122,11 @@ module Tinkerforge
|
|
120
122
|
send_request FUNCTION_GET_AVAILABLE_FOR_GROUP, [], '', 1, 'C'
|
121
123
|
end
|
122
124
|
|
123
|
-
# Sets the debounce period of the CALLBACK_INTERRUPT callback
|
125
|
+
# Sets the debounce period of the CALLBACK_INTERRUPT callback.
|
124
126
|
#
|
125
127
|
# For example: If you set this value to 100, you will get the interrupt
|
126
128
|
# maximal every 100ms. This is necessary if something that bounces is
|
127
129
|
# connected to the Digital In 4 Bricklet, such as a button.
|
128
|
-
#
|
129
|
-
# The default value is 100.
|
130
130
|
def set_debounce_period(debounce)
|
131
131
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
132
132
|
end
|
@@ -161,6 +161,8 @@ module Tinkerforge
|
|
161
161
|
# If you set the reset counter to *true*, the count is set back to 0
|
162
162
|
# directly after it is read.
|
163
163
|
#
|
164
|
+
# The edge counters use the grouping as set by BrickletIndustrialDigitalIn4#set_group.
|
165
|
+
#
|
164
166
|
# .. versionadded:: 2.0.1$nbsp;(Plugin)
|
165
167
|
def get_edge_count(pin, reset_counter)
|
166
168
|
send_request FUNCTION_GET_EDGE_COUNT, [pin, reset_counter], 'C ?', 4, 'L'
|
@@ -172,18 +174,16 @@ module Tinkerforge
|
|
172
174
|
# The edge type parameter configures if rising edges, falling edges or
|
173
175
|
# both are counted if the pin is configured for input. Possible edge types are:
|
174
176
|
#
|
175
|
-
# * 0 = rising
|
177
|
+
# * 0 = rising
|
176
178
|
# * 1 = falling
|
177
179
|
# * 2 = both
|
178
180
|
#
|
179
|
-
# The debounce time is given in ms.
|
180
|
-
#
|
181
181
|
# Configuring an edge counter resets its value to 0.
|
182
182
|
#
|
183
183
|
# If you don't know what any of this means, just leave it at default. The
|
184
184
|
# default configuration is very likely OK for you.
|
185
185
|
#
|
186
|
-
#
|
186
|
+
# The edge counters use the grouping as set by BrickletIndustrialDigitalIn4#set_group.
|
187
187
|
#
|
188
188
|
# .. versionadded:: 2.0.1$nbsp;(Plugin)
|
189
189
|
def set_edge_count_config(selection_mask, edge_type, debounce)
|
@@ -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 #
|
@@ -123,7 +123,7 @@ module Tinkerforge
|
|
123
123
|
|
124
124
|
# This callback can be configured per channel.
|
125
125
|
#
|
126
|
-
# The period
|
126
|
+
# The period is the period with which the CALLBACK_VALUE
|
127
127
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
128
128
|
#
|
129
129
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -132,8 +132,6 @@ module Tinkerforge
|
|
132
132
|
#
|
133
133
|
# If it is set to false, the callback is continuously triggered with the period,
|
134
134
|
# independent of the value.
|
135
|
-
#
|
136
|
-
# The default value is (0, false).
|
137
135
|
def set_value_callback_configuration(channel, period, value_has_to_change)
|
138
136
|
send_request FUNCTION_SET_VALUE_CALLBACK_CONFIGURATION, [channel, period, value_has_to_change], 'C L ?', 0, ''
|
139
137
|
end
|
@@ -144,7 +142,7 @@ module Tinkerforge
|
|
144
142
|
send_request FUNCTION_GET_VALUE_CALLBACK_CONFIGURATION, [channel], 'C', 5, 'L ?'
|
145
143
|
end
|
146
144
|
|
147
|
-
# The period
|
145
|
+
# The period is the period with which the CALLBACK_ALL_VALUE
|
148
146
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
149
147
|
#
|
150
148
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -153,8 +151,6 @@ module Tinkerforge
|
|
153
151
|
#
|
154
152
|
# If it is set to false, the callback is continuously triggered with the period,
|
155
153
|
# independent of the value.
|
156
|
-
#
|
157
|
-
# The default value is (0, false).
|
158
154
|
def set_all_value_callback_configuration(period, value_has_to_change)
|
159
155
|
send_request FUNCTION_SET_ALL_VALUE_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
160
156
|
end
|
@@ -179,18 +175,14 @@ module Tinkerforge
|
|
179
175
|
# The edge type parameter configures if rising edges, falling edges or both are
|
180
176
|
# counted. Possible edge types are:
|
181
177
|
#
|
182
|
-
# * 0 = rising
|
178
|
+
# * 0 = rising
|
183
179
|
# * 1 = falling
|
184
180
|
# * 2 = both
|
185
181
|
#
|
186
|
-
# The debounce time is given in ms.
|
187
|
-
#
|
188
182
|
# Configuring an edge counter resets its value to 0.
|
189
183
|
#
|
190
184
|
# If you don't know what any of this means, just leave it at default. The
|
191
185
|
# default configuration is very likely OK for you.
|
192
|
-
#
|
193
|
-
# Default values: 0 (edge type) and 100ms (debounce time)
|
194
186
|
def set_edge_count_configuration(channel, edge_type, debounce)
|
195
187
|
send_request FUNCTION_SET_EDGE_COUNT_CONFIGURATION, [channel, edge_type, debounce], 'C C C', 0, ''
|
196
188
|
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 #
|
@@ -81,7 +81,7 @@ module Tinkerforge
|
|
81
81
|
# The second parameter is a bitmask with the desired value of the specified
|
82
82
|
# pins. A 1 in the bitmask means high and a 0 in the bitmask means low.
|
83
83
|
#
|
84
|
-
# The third parameter indicates the time
|
84
|
+
# The third parameter indicates the time that the pins should hold
|
85
85
|
# the value.
|
86
86
|
#
|
87
87
|
# If this function is called with the parameters (9, 1, 1500) or
|
@@ -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 #
|
@@ -122,7 +122,7 @@ module Tinkerforge
|
|
122
122
|
end
|
123
123
|
|
124
124
|
# The first parameter is the desired state of the channel (*true* means output *high*
|
125
|
-
# and *false* means output *low*). The second parameter indicates the time
|
125
|
+
# and *false* means output *low*). The second parameter indicates the time that
|
126
126
|
# the channel should hold the state.
|
127
127
|
#
|
128
128
|
# If this function is called with the parameters (true, 1500):
|
@@ -162,20 +162,17 @@ module Tinkerforge
|
|
162
162
|
send_request FUNCTION_GET_CHANNEL_LED_CONFIG, [channel], 'C', 1, 'C'
|
163
163
|
end
|
164
164
|
|
165
|
-
# Activates a PWM for the given channel
|
166
|
-
# cycle given in 1/100%.
|
165
|
+
# Activates a PWM for the given channel.
|
167
166
|
#
|
168
167
|
# To turn the PWM off again, you can set the frequency to 0 or any other
|
169
168
|
# function that changes a value of the channel (e.g. BrickletIndustrialDigitalOut4V2#set_selected_value).
|
170
169
|
#
|
171
|
-
# The
|
170
|
+
# The optocoupler of the Industrial Digital
|
172
171
|
# Out 4 Bricklet 2.0 has a rise time and fall time of 11.5us (each) at 24V. So the maximum
|
173
172
|
# useful frequency value is about 400000 (40kHz).
|
174
173
|
#
|
175
174
|
# A running monoflop timer for the given channel will be aborted if this function
|
176
175
|
# is called.
|
177
|
-
#
|
178
|
-
# The default values are 0, 0.
|
179
176
|
def set_pwm_configuration(channel, frequency, duty_cycle)
|
180
177
|
send_request FUNCTION_SET_PWM_CONFIGURATION, [channel, frequency, duty_cycle], 'C L S', 0, ''
|
181
178
|
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 #
|
@@ -75,11 +75,10 @@ module Tinkerforge
|
|
75
75
|
|
76
76
|
end
|
77
77
|
|
78
|
-
# Returns the current of the specified sensor
|
79
|
-
# and between 0nA and 22505322nA (22.5mA).
|
78
|
+
# Returns the current of the specified sensor.
|
80
79
|
#
|
81
80
|
# It is possible to detect if an IEC 60381-1 compatible sensor is connected
|
82
|
-
# and if it works
|
81
|
+
# and if it works properly.
|
83
82
|
#
|
84
83
|
# If the returned current is below 4mA, there is likely no sensor connected
|
85
84
|
# or the sensor may be defect. If the returned current is over 20mA, there might
|
@@ -92,13 +91,11 @@ module Tinkerforge
|
|
92
91
|
send_request FUNCTION_GET_CURRENT, [sensor], 'C', 4, 'l'
|
93
92
|
end
|
94
93
|
|
95
|
-
# Sets the period
|
94
|
+
# Sets the period with which the CALLBACK_CURRENT callback is triggered
|
96
95
|
# periodically for the given sensor. A value of 0 turns the callback off.
|
97
96
|
#
|
98
97
|
# The CALLBACK_CURRENT callback is only triggered if the current has changed since the
|
99
98
|
# last triggering.
|
100
|
-
#
|
101
|
-
# The default value is 0.
|
102
99
|
def set_current_callback_period(sensor, period)
|
103
100
|
send_request FUNCTION_SET_CURRENT_CALLBACK_PERIOD, [sensor, period], 'C L', 0, ''
|
104
101
|
end
|
@@ -120,8 +117,6 @@ module Tinkerforge
|
|
120
117
|
# "'i'", "Callback is triggered when the current is *inside* the min and max values"
|
121
118
|
# "'<'", "Callback is triggered when the current is smaller than the min value (max is ignored)"
|
122
119
|
# "'>'", "Callback is triggered when the current is greater than the min value (max is ignored)"
|
123
|
-
#
|
124
|
-
# The default value is ('x', 0, 0).
|
125
120
|
def set_current_callback_threshold(sensor, option, min, max)
|
126
121
|
send_request FUNCTION_SET_CURRENT_CALLBACK_THRESHOLD, [sensor, option, min, max], 'C k l l', 0, ''
|
127
122
|
end
|
@@ -131,7 +126,7 @@ module Tinkerforge
|
|
131
126
|
send_request FUNCTION_GET_CURRENT_CALLBACK_THRESHOLD, [sensor], 'C', 9, 'k l l'
|
132
127
|
end
|
133
128
|
|
134
|
-
# Sets the period
|
129
|
+
# Sets the period with which the threshold callback
|
135
130
|
#
|
136
131
|
# * CALLBACK_CURRENT_REACHED
|
137
132
|
#
|
@@ -140,8 +135,6 @@ module Tinkerforge
|
|
140
135
|
# * BrickletIndustrialDual020mA#set_current_callback_threshold
|
141
136
|
#
|
142
137
|
# keeps being reached.
|
143
|
-
#
|
144
|
-
# The default value is 100.
|
145
138
|
def set_debounce_period(debounce)
|
146
139
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
147
140
|
end
|
@@ -160,8 +153,6 @@ module Tinkerforge
|
|
160
153
|
# "1", "60 samples per second, 14 bit resolution"
|
161
154
|
# "2", "15 samples per second, 16 bit resolution"
|
162
155
|
# "3", "4 samples per second, 18 bit resolution"
|
163
|
-
#
|
164
|
-
# The default value is 3 (4 samples per second with 18 bit resolution).
|
165
156
|
def set_sample_rate(rate)
|
166
157
|
send_request FUNCTION_SET_SAMPLE_RATE, [rate], 'C', 0, ''
|
167
158
|
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 #
|
@@ -115,8 +115,7 @@ module Tinkerforge
|
|
115
115
|
|
116
116
|
end
|
117
117
|
|
118
|
-
# Returns the current of the specified channel.
|
119
|
-
# 0nA and 22505322nA (22.5mA).
|
118
|
+
# Returns the current of the specified channel.
|
120
119
|
#
|
121
120
|
# It is possible to detect if an IEC 60381-1 compatible sensor is connected
|
122
121
|
# and if it works probably.
|
@@ -133,7 +132,7 @@ module Tinkerforge
|
|
133
132
|
send_request FUNCTION_GET_CURRENT, [channel], 'C', 4, 'l'
|
134
133
|
end
|
135
134
|
|
136
|
-
# The period
|
135
|
+
# The period is the period with which the CALLBACK_CURRENT callback is triggered
|
137
136
|
# periodically. A value of 0 turns the callback off.
|
138
137
|
#
|
139
138
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -158,8 +157,6 @@ module Tinkerforge
|
|
158
157
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
159
158
|
#
|
160
159
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
161
|
-
#
|
162
|
-
# The default value is (0, false, 'x', 0, 0).
|
163
160
|
def set_current_callback_configuration(channel, period, value_has_to_change, option, min, max)
|
164
161
|
send_request FUNCTION_SET_CURRENT_CALLBACK_CONFIGURATION, [channel, period, value_has_to_change, option, min, max], 'C L ? k l l', 0, ''
|
165
162
|
end
|
@@ -178,8 +175,6 @@ module Tinkerforge
|
|
178
175
|
# "1", "60 samples per second, 14 bit resolution"
|
179
176
|
# "2", "15 samples per second, 16 bit resolution"
|
180
177
|
# "3", "4 samples per second, 18 bit resolution"
|
181
|
-
#
|
182
|
-
# The default value is 3 (4 samples per second with 18 bit resolution).
|
183
178
|
def set_sample_rate(rate)
|
184
179
|
send_request FUNCTION_SET_SAMPLE_RATE, [rate], 'C', 0, ''
|
185
180
|
end
|
@@ -194,8 +189,6 @@ module Tinkerforge
|
|
194
189
|
#
|
195
190
|
# Example: If you measure 0.5mA with a gain of 8x the return value will be
|
196
191
|
# 4mA.
|
197
|
-
#
|
198
|
-
# The default gain is 1x.
|
199
192
|
def set_gain(gain)
|
200
193
|
send_request FUNCTION_SET_GAIN, [gain], 'C', 0, ''
|
201
194
|
end
|
@@ -211,8 +204,6 @@ module Tinkerforge
|
|
211
204
|
# of the LED can change with the measured value.
|
212
205
|
#
|
213
206
|
# You can configure the channel status behavior with BrickletIndustrialDual020mAV2#set_channel_led_status_config.
|
214
|
-
#
|
215
|
-
# By default all channel LEDs are configured as "Channel Status".
|
216
207
|
def set_channel_led_config(channel, config)
|
217
208
|
send_request FUNCTION_SET_CHANNEL_LED_CONFIG, [channel, config], 'C C', 0, ''
|
218
209
|
end
|
@@ -242,9 +233,6 @@ module Tinkerforge
|
|
242
233
|
# on at 20mA and above and the brightness is linearly scaled between the values
|
243
234
|
# 4mA and 20mA. If the min value is greater than the max value, the LED brightness
|
244
235
|
# is scaled the other way around.
|
245
|
-
#
|
246
|
-
# By default the channel LED status config is set to intensity with min=4mA and
|
247
|
-
# max=20mA.
|
248
236
|
def set_channel_led_status_config(channel, min, max, config)
|
249
237
|
send_request FUNCTION_SET_CHANNEL_LED_STATUS_CONFIG, [channel, min, max, config], 'C l l C', 0, ''
|
250
238
|
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 #
|
@@ -85,7 +85,7 @@ module Tinkerforge
|
|
85
85
|
|
86
86
|
end
|
87
87
|
|
88
|
-
# Returns the voltage for the given channel
|
88
|
+
# Returns the voltage for the given channel.
|
89
89
|
#
|
90
90
|
# If you want to get the voltage periodically, it is recommended to use the
|
91
91
|
# CALLBACK_VOLTAGE callback and set the period with
|
@@ -94,13 +94,11 @@ module Tinkerforge
|
|
94
94
|
send_request FUNCTION_GET_VOLTAGE, [channel], 'C', 4, 'l'
|
95
95
|
end
|
96
96
|
|
97
|
-
# Sets the period
|
97
|
+
# Sets the period with which the CALLBACK_VOLTAGE callback is triggered
|
98
98
|
# periodically for the given channel. A value of 0 turns the callback off.
|
99
99
|
#
|
100
100
|
# The CALLBACK_VOLTAGE callback is only triggered if the voltage has changed since the
|
101
101
|
# last triggering.
|
102
|
-
#
|
103
|
-
# The default value is 0.
|
104
102
|
def set_voltage_callback_period(channel, period)
|
105
103
|
send_request FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD, [channel, period], 'C L', 0, ''
|
106
104
|
end
|
@@ -122,8 +120,6 @@ module Tinkerforge
|
|
122
120
|
# "'i'", "Callback is triggered when the voltage is *inside* the min and max values"
|
123
121
|
# "'<'", "Callback is triggered when the voltage is smaller than the min value (max is ignored)"
|
124
122
|
# "'>'", "Callback is triggered when the voltage is greater than the min value (max is ignored)"
|
125
|
-
#
|
126
|
-
# The default value is ('x', 0, 0).
|
127
123
|
def set_voltage_callback_threshold(channel, option, min, max)
|
128
124
|
send_request FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD, [channel, option, min, max], 'C k l l', 0, ''
|
129
125
|
end
|
@@ -133,7 +129,7 @@ module Tinkerforge
|
|
133
129
|
send_request FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD, [channel], 'C', 9, 'k l l'
|
134
130
|
end
|
135
131
|
|
136
|
-
# Sets the period
|
132
|
+
# Sets the period with which the threshold callback
|
137
133
|
#
|
138
134
|
# * CALLBACK_VOLTAGE_REACHED
|
139
135
|
#
|
@@ -142,8 +138,6 @@ module Tinkerforge
|
|
142
138
|
# * BrickletIndustrialDualAnalogIn#set_voltage_callback_threshold
|
143
139
|
#
|
144
140
|
# keeps being reached.
|
145
|
-
#
|
146
|
-
# The default value is 100.
|
147
141
|
def set_debounce_period(debounce)
|
148
142
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
149
143
|
end
|
@@ -156,8 +150,6 @@ module Tinkerforge
|
|
156
150
|
# Sets the sample rate. The sample rate can be between 1 sample per second
|
157
151
|
# and 976 samples per second. Decreasing the sample rate will also decrease the
|
158
152
|
# noise on the data.
|
159
|
-
#
|
160
|
-
# The default value is 6 (2 samples per second).
|
161
153
|
def set_sample_rate(rate)
|
162
154
|
send_request FUNCTION_SET_SAMPLE_RATE, [rate], 'C', 0, ''
|
163
155
|
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 #
|
@@ -117,7 +117,7 @@ module Tinkerforge
|
|
117
117
|
|
118
118
|
end
|
119
119
|
|
120
|
-
# Returns the voltage for the given channel
|
120
|
+
# Returns the voltage for the given channel.
|
121
121
|
#
|
122
122
|
#
|
123
123
|
# If you want to get the value periodically, it is recommended to use the
|
@@ -127,7 +127,7 @@ module Tinkerforge
|
|
127
127
|
send_request FUNCTION_GET_VOLTAGE, [channel], 'C', 4, 'l'
|
128
128
|
end
|
129
129
|
|
130
|
-
# The period
|
130
|
+
# The period is the period with which the CALLBACK_VOLTAGE callback is triggered
|
131
131
|
# periodically. A value of 0 turns the callback off.
|
132
132
|
#
|
133
133
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -152,8 +152,6 @@ module Tinkerforge
|
|
152
152
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
153
153
|
#
|
154
154
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
155
|
-
#
|
156
|
-
# The default value is (0, false, 'x', 0, 0).
|
157
155
|
def set_voltage_callback_configuration(channel, period, value_has_to_change, option, min, max)
|
158
156
|
send_request FUNCTION_SET_VOLTAGE_CALLBACK_CONFIGURATION, [channel, period, value_has_to_change, option, min, max], 'C L ? k l l', 0, ''
|
159
157
|
end
|
@@ -166,8 +164,6 @@ module Tinkerforge
|
|
166
164
|
# Sets the sample rate. The sample rate can be between 1 sample per second
|
167
165
|
# and 976 samples per second. Decreasing the sample rate will also decrease the
|
168
166
|
# noise on the data.
|
169
|
-
#
|
170
|
-
# The default value is 6 (2 samples per second).
|
171
167
|
def set_sample_rate(rate)
|
172
168
|
send_request FUNCTION_SET_SAMPLE_RATE, [rate], 'C', 0, ''
|
173
169
|
end
|
@@ -234,9 +230,6 @@ module Tinkerforge
|
|
234
230
|
# and the brightness is linearly scaled between the values 4V and 20V. If the
|
235
231
|
# min value is greater than the max value, the LED brightness is scaled the other
|
236
232
|
# way around.
|
237
|
-
#
|
238
|
-
# By default the channel LED status config is set to intensity with min=0V and
|
239
|
-
# max=10V.
|
240
233
|
def set_channel_led_status_config(channel, min, max, config)
|
241
234
|
send_request FUNCTION_SET_CHANNEL_LED_STATUS_CONFIG, [channel, min, max, config], 'C l l C', 0, ''
|
242
235
|
end
|