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 #
|
@@ -119,7 +119,7 @@ module Tinkerforge
|
|
119
119
|
send_request FUNCTION_GET_WEIGHT, [], '', 4, 'l'
|
120
120
|
end
|
121
121
|
|
122
|
-
# The period
|
122
|
+
# The period is the period with which the CALLBACK_WEIGHT callback is triggered
|
123
123
|
# periodically. A value of 0 turns the callback off.
|
124
124
|
#
|
125
125
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -144,8 +144,6 @@ module Tinkerforge
|
|
144
144
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
145
145
|
#
|
146
146
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
147
|
-
#
|
148
|
-
# The default value is (0, false, 'x', 0, 0).
|
149
147
|
def set_weight_callback_configuration(period, value_has_to_change, option, min, max)
|
150
148
|
send_request FUNCTION_SET_WEIGHT_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 0, ''
|
151
149
|
end
|
@@ -160,10 +158,6 @@ module Tinkerforge
|
|
160
158
|
#
|
161
159
|
# Setting the length to 1 will turn the averaging off. With less
|
162
160
|
# averaging, there is more noise on the data.
|
163
|
-
#
|
164
|
-
# The range for the averaging is 1-100.
|
165
|
-
#
|
166
|
-
# The default value is 4.
|
167
161
|
def set_moving_average(average)
|
168
162
|
send_request FUNCTION_SET_MOVING_AVERAGE, [average], 'S', 0, ''
|
169
163
|
end
|
@@ -187,8 +181,7 @@ module Tinkerforge
|
|
187
181
|
# To calibrate your Load Cell Bricklet 2.0 you have to
|
188
182
|
#
|
189
183
|
# * empty the scale and call this function with 0 and
|
190
|
-
# * add a known weight to the scale and call this function with the weight
|
191
|
-
# grams.
|
184
|
+
# * add a known weight to the scale and call this function with the weight.
|
192
185
|
#
|
193
186
|
# The calibration is saved in the flash of the Bricklet and only
|
194
187
|
# needs to be done once.
|
@@ -216,8 +209,6 @@ module Tinkerforge
|
|
216
209
|
# means the voltage range is ±15mV for most load cells (i.e. gain of 128x
|
217
210
|
# is best). If you don't know what all of this means you should keep it at
|
218
211
|
# 128x, it will most likely be correct.
|
219
|
-
#
|
220
|
-
# The default rate is 10Hz and the default gain is 128x.
|
221
212
|
def set_configuration(rate, gain)
|
222
213
|
send_request FUNCTION_SET_CONFIGURATION, [rate, gain], 'C C', 0, ''
|
223
214
|
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 #
|
@@ -71,8 +71,8 @@ module Tinkerforge
|
|
71
71
|
|
72
72
|
end
|
73
73
|
|
74
|
-
# Returns the current moisture value.
|
75
|
-
#
|
74
|
+
# Returns the current moisture value.
|
75
|
+
# A small value corresponds to little moisture, a big
|
76
76
|
# value corresponds to much moisture.
|
77
77
|
#
|
78
78
|
# If you want to get the moisture value periodically, it is recommended
|
@@ -82,13 +82,11 @@ module Tinkerforge
|
|
82
82
|
send_request FUNCTION_GET_MOISTURE_VALUE, [], '', 2, 'S'
|
83
83
|
end
|
84
84
|
|
85
|
-
# Sets the period
|
85
|
+
# Sets the period with which the CALLBACK_MOISTURE callback is triggered
|
86
86
|
# periodically. A value of 0 turns the callback off.
|
87
87
|
#
|
88
88
|
# The CALLBACK_MOISTURE callback is only triggered if the moisture value has changed
|
89
89
|
# since the last triggering.
|
90
|
-
#
|
91
|
-
# The default value is 0.
|
92
90
|
def set_moisture_callback_period(period)
|
93
91
|
send_request FUNCTION_SET_MOISTURE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
94
92
|
end
|
@@ -109,8 +107,6 @@ module Tinkerforge
|
|
109
107
|
# "'i'", "Callback is triggered when the moisture value is *inside* the min and max values"
|
110
108
|
# "'<'", "Callback is triggered when the moisture value is smaller than the min value (max is ignored)"
|
111
109
|
# "'>'", "Callback is triggered when the moisture value is greater than the min value (max is ignored)"
|
112
|
-
#
|
113
|
-
# The default value is ('x', 0, 0).
|
114
110
|
def set_moisture_callback_threshold(option, min, max)
|
115
111
|
send_request FUNCTION_SET_MOISTURE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
116
112
|
end
|
@@ -120,7 +116,7 @@ module Tinkerforge
|
|
120
116
|
send_request FUNCTION_GET_MOISTURE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
121
117
|
end
|
122
118
|
|
123
|
-
# Sets the period
|
119
|
+
# Sets the period with which the threshold callback
|
124
120
|
#
|
125
121
|
# * CALLBACK_MOISTURE_REACHED
|
126
122
|
#
|
@@ -129,8 +125,6 @@ module Tinkerforge
|
|
129
125
|
# * BrickletMoisture#set_moisture_callback_threshold
|
130
126
|
#
|
131
127
|
# keeps being reached.
|
132
|
-
#
|
133
|
-
# The default value is 100.
|
134
128
|
def set_debounce_period(debounce)
|
135
129
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
136
130
|
end
|
@@ -145,10 +139,6 @@ module Tinkerforge
|
|
145
139
|
#
|
146
140
|
# Setting the length to 0 will turn the averaging completely off. With less
|
147
141
|
# averaging, there is more noise on the data.
|
148
|
-
#
|
149
|
-
# The range for the averaging is 0-100.
|
150
|
-
#
|
151
|
-
# The default value is 100.
|
152
142
|
def set_moving_average(average)
|
153
143
|
send_request FUNCTION_SET_MOVING_AVERAGE, [average], 'C', 0, ''
|
154
144
|
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 #
|
@@ -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 #
|
@@ -98,7 +98,7 @@ module Tinkerforge
|
|
98
98
|
send_request FUNCTION_GET_MOTION_DETECTED, [], '', 1, 'C'
|
99
99
|
end
|
100
100
|
|
101
|
-
# Sets the sensitivity of the PIR sensor.
|
101
|
+
# Sets the sensitivity of the PIR sensor. At full
|
102
102
|
# sensitivity (100), the Bricklet can detect motion in a range of approximately 12m.
|
103
103
|
#
|
104
104
|
# The actual range depends on many things in the environment (e.g. reflections) and the
|
@@ -106,8 +106,6 @@ module Tinkerforge
|
|
106
106
|
# of 10m a cat may only be detected at 2m distance with the same setting.
|
107
107
|
#
|
108
108
|
# So you will have to find a good sensitivity for your application by trial and error.
|
109
|
-
#
|
110
|
-
# The default value is 50.
|
111
109
|
def set_sensitivity(sensitivity)
|
112
110
|
send_request FUNCTION_SET_SENSITIVITY, [sensitivity], 'C', 0, ''
|
113
111
|
end
|
@@ -121,8 +119,6 @@ module Tinkerforge
|
|
121
119
|
# three LEDs. The brightness of each LED can be controlled with a 8-bit value
|
122
120
|
# (0-255). A value of 0 turns the LED off and a value of 255 turns the LED
|
123
121
|
# to full brightness.
|
124
|
-
#
|
125
|
-
# The default value is 0, 0, 0.
|
126
122
|
def set_indicator(top_left, top_right, bottom)
|
127
123
|
send_request FUNCTION_SET_INDICATOR, [top_left, top_right, bottom], 'C C C', 0, ''
|
128
124
|
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,7 +115,7 @@ module Tinkerforge
|
|
115
115
|
send_request FUNCTION_GET_POSITION, [], '', 2, 'S'
|
116
116
|
end
|
117
117
|
|
118
|
-
# The period
|
118
|
+
# The period is the period with which the CALLBACK_POSITION callback is triggered
|
119
119
|
# periodically. A value of 0 turns the callback off.
|
120
120
|
#
|
121
121
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -140,8 +140,6 @@ module Tinkerforge
|
|
140
140
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
141
141
|
#
|
142
142
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
143
|
-
#
|
144
|
-
# The default value is (0, false, 'x', 0, 0).
|
145
143
|
def set_position_callback_configuration(period, value_has_to_change, option, min, max)
|
146
144
|
send_request FUNCTION_SET_POSITION_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k S S', 0, ''
|
147
145
|
end
|
@@ -190,8 +188,6 @@ module Tinkerforge
|
|
190
188
|
end
|
191
189
|
|
192
190
|
# Enables/Disables CALLBACK_POSITION_REACHED callback.
|
193
|
-
#
|
194
|
-
# By default the callback is enabled.
|
195
191
|
def set_position_reached_callback_configuration(enabled)
|
196
192
|
send_request FUNCTION_SET_POSITION_REACHED_CALLBACK_CONFIGURATION, [enabled], '?', 0, ''
|
197
193
|
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 #
|
@@ -109,10 +109,6 @@ module Tinkerforge
|
|
109
109
|
#
|
110
110
|
# After a new sensitivity is set, you likely want to call BrickletMultiTouch#recalibrate
|
111
111
|
# to calibrate the electrodes with the newly defined sensitivity.
|
112
|
-
#
|
113
|
-
# The valid sensitivity value range is 5-201.
|
114
|
-
#
|
115
|
-
# The default sensitivity value is 181.
|
116
112
|
def set_electrode_sensitivity(sensitivity)
|
117
113
|
send_request FUNCTION_SET_ELECTRODE_SENSITIVITY, [sensitivity], 'C', 0, ''
|
118
114
|
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 #
|
@@ -122,7 +122,7 @@ module Tinkerforge
|
|
122
122
|
send_request FUNCTION_GET_TOUCH_STATE, [], '', 13, '?13'
|
123
123
|
end
|
124
124
|
|
125
|
-
# The period
|
125
|
+
# The period is the period with which the CALLBACK_TOUCH_STATE callback
|
126
126
|
# is triggered periodically. A value of 0 turns the callback off.
|
127
127
|
#
|
128
128
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -131,8 +131,6 @@ module Tinkerforge
|
|
131
131
|
#
|
132
132
|
# If it is set to false, the callback is continuously triggered with the period,
|
133
133
|
# independent of the value.
|
134
|
-
#
|
135
|
-
# The default value is (0, false).
|
136
134
|
def set_touch_state_callback_configuration(period, value_has_to_change)
|
137
135
|
send_request FUNCTION_SET_TOUCH_STATE_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
138
136
|
end
|
@@ -161,8 +159,6 @@ module Tinkerforge
|
|
161
159
|
# traffic that is produced by the CALLBACK_TOUCH_STATE callback.
|
162
160
|
#
|
163
161
|
# Disabling electrodes will also reduce power consumption.
|
164
|
-
#
|
165
|
-
# Default: All electrodes enabled.
|
166
162
|
def set_electrode_config(enabled_electrodes)
|
167
163
|
send_request FUNCTION_SET_ELECTRODE_CONFIG, [enabled_electrodes], '?13', 0, ''
|
168
164
|
end
|
@@ -181,10 +177,6 @@ module Tinkerforge
|
|
181
177
|
#
|
182
178
|
# After a new sensitivity is set, you likely want to call BrickletMultiTouchV2#recalibrate
|
183
179
|
# to calibrate the electrodes with the newly defined sensitivity.
|
184
|
-
#
|
185
|
-
# The valid sensitivity value range is 5-201.
|
186
|
-
#
|
187
|
-
# The default sensitivity value is 181.
|
188
180
|
def set_electrode_sensitivity(sensitivity)
|
189
181
|
send_request FUNCTION_SET_ELECTRODE_SENSITIVITY, [sensitivity], 'C', 0, ''
|
190
182
|
end
|
@@ -196,8 +188,6 @@ module Tinkerforge
|
|
196
188
|
|
197
189
|
# Configures the touch LED to be either turned off, turned on, blink in
|
198
190
|
# heartbeat mode or show the touch state (electrode touched = LED on).
|
199
|
-
#
|
200
|
-
# The default value is 3 (show touch state).
|
201
191
|
def set_touch_led_config(config)
|
202
192
|
send_request FUNCTION_SET_TOUCH_LED_CONFIG, [config], 'C', 0, ''
|
203
193
|
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 #
|
@@ -205,8 +205,6 @@ module Tinkerforge
|
|
205
205
|
# If you change a mode, the Bricklet will reconfigure the hardware for this mode.
|
206
206
|
# Therefore, you can only use functions corresponding to the current mode. For
|
207
207
|
# example, in Reader mode you can only use Reader functions.
|
208
|
-
#
|
209
|
-
# The default mode is "off".
|
210
208
|
def set_mode(mode)
|
211
209
|
send_request FUNCTION_SET_MODE, [mode], 'C', 0, ''
|
212
210
|
end
|
@@ -284,7 +282,7 @@ module Tinkerforge
|
|
284
282
|
send_request FUNCTION_READER_GET_STATE, [], '', 2, 'C ?'
|
285
283
|
end
|
286
284
|
|
287
|
-
# Writes NDEF formated data
|
285
|
+
# Writes NDEF formated data.
|
288
286
|
#
|
289
287
|
# This function currently supports NFC Forum Type 2 and 4.
|
290
288
|
#
|
@@ -323,8 +321,6 @@ module Tinkerforge
|
|
323
321
|
|
324
322
|
# Returns the NDEF data from an internal buffer. To fill the buffer
|
325
323
|
# with a NDEF message you have to call BrickletNFC#reader_request_ndef beforehand.
|
326
|
-
#
|
327
|
-
# The buffer can have a size of up to 8192 bytes.
|
328
324
|
def reader_read_ndef_low_level
|
329
325
|
send_request FUNCTION_READER_READ_NDEF_LOW_LEVEL, [], '', 64, 'S S C60'
|
330
326
|
end
|
@@ -420,8 +416,6 @@ module Tinkerforge
|
|
420
416
|
|
421
417
|
# Returns the page data from an internal buffer. To fill the buffer
|
422
418
|
# with specific pages you have to call BrickletNFC#reader_request_page beforehand.
|
423
|
-
#
|
424
|
-
# The buffer can have a size of up to 8192 bytes.
|
425
419
|
def reader_read_page_low_level
|
426
420
|
send_request FUNCTION_READER_READ_PAGE_LOW_LEVEL, [], '', 64, 'S S C60'
|
427
421
|
end
|
@@ -545,7 +539,6 @@ module Tinkerforge
|
|
545
539
|
end
|
546
540
|
|
547
541
|
# Returns the NDEF message that was written by a NFC peer in NFC P2P mode.
|
548
|
-
# The maximum NDEF length is 8192 byte.
|
549
542
|
#
|
550
543
|
# The NDEF message is ready if you called BrickletNFC#p2p_start_transfer with a
|
551
544
|
# read transfer and the P2P state changed to *P2PTransferNDEFReady*.
|
@@ -568,7 +561,7 @@ module Tinkerforge
|
|
568
561
|
send_request FUNCTION_GET_DETECTION_LED_CONFIG, [], '', 1, 'C'
|
569
562
|
end
|
570
563
|
|
571
|
-
# Sets the maximum timeout
|
564
|
+
# Sets the maximum timeout.
|
572
565
|
#
|
573
566
|
# This is a global maximum used for all internal state timeouts. The timeouts depend heavily
|
574
567
|
# on the used tags etc. For example: If you use a Type 2 tag and you want to detect if
|
@@ -583,11 +576,9 @@ module Tinkerforge
|
|
583
576
|
# If you need a fast response time to discover if a tag is present or not you can find
|
584
577
|
# a good timeout value by trial and error for your specific tag.
|
585
578
|
#
|
586
|
-
# By default we use a very conservative timeout, to be sure that any
|
579
|
+
# By default we use a very conservative timeout, to be sure that any tag can always
|
587
580
|
# answer in time.
|
588
581
|
#
|
589
|
-
# Default timeout: 2000ms.
|
590
|
-
#
|
591
582
|
# .. versionadded:: 2.0.1$nbsp;(Plugin)
|
592
583
|
def set_maximum_timeout(timeout)
|
593
584
|
send_request FUNCTION_SET_MAXIMUM_TIMEOUT, [timeout], 'S', 0, ''
|
@@ -734,7 +725,7 @@ module Tinkerforge
|
|
734
725
|
[ret[0], ret[2][0, ret[1]]]
|
735
726
|
end
|
736
727
|
|
737
|
-
# Writes NDEF formated data
|
728
|
+
# Writes NDEF formated data.
|
738
729
|
#
|
739
730
|
# This function currently supports NFC Forum Type 2 and 4.
|
740
731
|
#
|
@@ -781,8 +772,6 @@ module Tinkerforge
|
|
781
772
|
|
782
773
|
# Returns the NDEF data from an internal buffer. To fill the buffer
|
783
774
|
# with a NDEF message you have to call BrickletNFC#reader_request_ndef beforehand.
|
784
|
-
#
|
785
|
-
# The buffer can have a size of up to 8192 bytes.
|
786
775
|
def reader_read_ndef
|
787
776
|
ndef_length = nil # assigned in block
|
788
777
|
ndef_data = nil # assigned in block
|
@@ -876,8 +865,6 @@ module Tinkerforge
|
|
876
865
|
|
877
866
|
# Returns the page data from an internal buffer. To fill the buffer
|
878
867
|
# with specific pages you have to call BrickletNFC#reader_request_page beforehand.
|
879
|
-
#
|
880
|
-
# The buffer can have a size of up to 8192 bytes.
|
881
868
|
def reader_read_page
|
882
869
|
data_length = nil # assigned in block
|
883
870
|
data_data = nil # assigned in block
|
@@ -988,7 +975,6 @@ module Tinkerforge
|
|
988
975
|
end
|
989
976
|
|
990
977
|
# Returns the NDEF message that was written by a NFC peer in NFC P2P mode.
|
991
|
-
# The maximum NDEF length is 8192 byte.
|
992
978
|
#
|
993
979
|
# The NDEF message is ready if you called BrickletNFC#p2p_start_transfer with a
|
994
980
|
# read transfer and the P2P state changed to *P2PTransferNDEFReady*.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -68,8 +68,6 @@ module Tinkerforge
|
|
68
68
|
|
69
69
|
# Sets the window in which you can write with BrickletOLED128x64#write. One row
|
70
70
|
# has a height of 8 pixels.
|
71
|
-
#
|
72
|
-
# The columns have a range of 0 to 127 and the rows have a range of 0 to 7.
|
73
71
|
def new_window(column_from, column_to, row_from, row_to)
|
74
72
|
send_request FUNCTION_NEW_WINDOW, [column_from, column_to, row_from, row_to], 'C C C C', 0, ''
|
75
73
|
end
|
@@ -83,8 +81,6 @@ module Tinkerforge
|
|
83
81
|
#
|
84
82
|
# You can set a contrast value from 0 to 255 and you can invert the color
|
85
83
|
# (black/white) of the display.
|
86
|
-
#
|
87
|
-
# The default values are contrast 143 and inverting off.
|
88
84
|
def set_display_configuration(contrast, invert)
|
89
85
|
send_request FUNCTION_SET_DISPLAY_CONFIGURATION, [contrast, invert], 'C ?', 0, ''
|
90
86
|
end
|
@@ -94,8 +90,8 @@ module Tinkerforge
|
|
94
90
|
send_request FUNCTION_GET_DISPLAY_CONFIGURATION, [], '', 2, 'C ?'
|
95
91
|
end
|
96
92
|
|
97
|
-
# Writes text to a specific line
|
98
|
-
#
|
93
|
+
# Writes text to a specific line with a specific position.
|
94
|
+
# The text can have a maximum of 26 characters.
|
99
95
|
#
|
100
96
|
# For example: (1, 10, "Hello") will write *Hello* in the middle of the
|
101
97
|
# second line of the display.
|