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 #
|
@@ -83,9 +83,8 @@ module Tinkerforge
|
|
83
83
|
|
84
84
|
# Writes pixels to the specified window.
|
85
85
|
#
|
86
|
-
# The
|
87
|
-
#
|
88
|
-
# right.
|
86
|
+
# The pixels are written into the window line by line top to bottom
|
87
|
+
# and each line is written from left to right.
|
89
88
|
#
|
90
89
|
# If automatic draw is enabled (default) the pixels are directly written to
|
91
90
|
# the screen. Only pixels that have actually changed are updated on the screen,
|
@@ -104,9 +103,8 @@ module Tinkerforge
|
|
104
103
|
|
105
104
|
# Reads pixels from the specified window.
|
106
105
|
#
|
107
|
-
# The
|
108
|
-
#
|
109
|
-
# right.
|
106
|
+
# The pixels are read from the window line by line top to bottom
|
107
|
+
# and each line is read from left to right.
|
110
108
|
#
|
111
109
|
# If automatic draw is enabled (default) the pixels that are read are always the
|
112
110
|
# same that are shown on the display.
|
@@ -144,8 +142,6 @@ module Tinkerforge
|
|
144
142
|
# call of BrickletOLED128x64V2#write_pixels or BrickletOLED128x64V2#write_line. If it is set to false, the
|
145
143
|
# changes are written into an internal buffer and only shown on the display after
|
146
144
|
# a call of BrickletOLED128x64V2#draw_buffered_frame.
|
147
|
-
#
|
148
|
-
# The default values are contrast 143, inverting off and automatic draw on.
|
149
145
|
def set_display_configuration(contrast, invert, automatic_draw)
|
150
146
|
send_request FUNCTION_SET_DISPLAY_CONFIGURATION, [contrast, invert, automatic_draw], 'C ? ?', 0, ''
|
151
147
|
end
|
@@ -155,8 +151,8 @@ module Tinkerforge
|
|
155
151
|
send_request FUNCTION_GET_DISPLAY_CONFIGURATION, [], '', 3, 'C ? ?'
|
156
152
|
end
|
157
153
|
|
158
|
-
# Writes text to a specific line
|
159
|
-
#
|
154
|
+
# Writes text to a specific line with a specific position.
|
155
|
+
# The text can have a maximum of 22 characters.
|
160
156
|
#
|
161
157
|
# For example: (1, 10, "Hello") will write *Hello* in the middle of the
|
162
158
|
# second line of the display.
|
@@ -312,9 +308,8 @@ module Tinkerforge
|
|
312
308
|
|
313
309
|
# Writes pixels to the specified window.
|
314
310
|
#
|
315
|
-
# The
|
316
|
-
#
|
317
|
-
# right.
|
311
|
+
# The pixels are written into the window line by line top to bottom
|
312
|
+
# and each line is written from left to right.
|
318
313
|
#
|
319
314
|
# If automatic draw is enabled (default) the pixels are directly written to
|
320
315
|
# the screen. Only pixels that have actually changed are updated on the screen,
|
@@ -360,9 +355,8 @@ module Tinkerforge
|
|
360
355
|
|
361
356
|
# Reads pixels from the specified window.
|
362
357
|
#
|
363
|
-
# The
|
364
|
-
#
|
365
|
-
# right.
|
358
|
+
# The pixels are read from the window line by line top to bottom
|
359
|
+
# and each line is read from left to right.
|
366
360
|
#
|
367
361
|
# If automatic draw is enabled (default) the pixels that are read are always the
|
368
362
|
# same that are shown on the display.
|
@@ -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 #
|
@@ -67,8 +67,6 @@ module Tinkerforge
|
|
67
67
|
|
68
68
|
# Sets the window in which you can write with BrickletOLED64x48#write. One row
|
69
69
|
# has a height of 8 pixels.
|
70
|
-
#
|
71
|
-
# The columns have a range of 0 to 63 and the rows have a range of 0 to 5.
|
72
70
|
def new_window(column_from, column_to, row_from, row_to)
|
73
71
|
send_request FUNCTION_NEW_WINDOW, [column_from, column_to, row_from, row_to], 'C C C C', 0, ''
|
74
72
|
end
|
@@ -82,8 +80,6 @@ module Tinkerforge
|
|
82
80
|
#
|
83
81
|
# You can set a contrast value from 0 to 255 and you can invert the color
|
84
82
|
# (black/white) of the display.
|
85
|
-
#
|
86
|
-
# The default values are contrast 143 and inverting off.
|
87
83
|
def set_display_configuration(contrast, invert)
|
88
84
|
send_request FUNCTION_SET_DISPLAY_CONFIGURATION, [contrast, invert], 'C ?', 0, ''
|
89
85
|
end
|
@@ -93,8 +89,8 @@ module Tinkerforge
|
|
93
89
|
send_request FUNCTION_GET_DISPLAY_CONFIGURATION, [], '', 2, 'C ?'
|
94
90
|
end
|
95
91
|
|
96
|
-
# Writes text to a specific line
|
97
|
-
#
|
92
|
+
# Writes text to a specific line with a specific position.
|
93
|
+
# The text can have a maximum of 13 characters.
|
98
94
|
#
|
99
95
|
# For example: (1, 4, "Hello") will write *Hello* in the middle of the
|
100
96
|
# second line of the display.
|
@@ -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 #
|
@@ -27,7 +27,7 @@ module Tinkerforge
|
|
27
27
|
# Reports the sensor data every time a new data packet is received.
|
28
28
|
# See BrickletOutdoorWeather#get_sensor_data for information about the data.
|
29
29
|
#
|
30
|
-
# For each
|
30
|
+
# For each sensor the callback will be called about every 45 seconds.
|
31
31
|
#
|
32
32
|
# Turn the callback on/off with BrickletOutdoorWeather#set_sensor_callback_configuration
|
33
33
|
# (by default it is turned off).
|
@@ -149,14 +149,14 @@ module Tinkerforge
|
|
149
149
|
#
|
150
150
|
# The return values are:
|
151
151
|
#
|
152
|
-
# * Temperature
|
153
|
-
# * Humidity
|
154
|
-
# * Wind Speed
|
155
|
-
# * Gust Speed
|
156
|
-
# * Rain Fall
|
157
|
-
# * Wind Direction
|
158
|
-
# * Battery Low (true
|
159
|
-
# * Last Change (
|
152
|
+
# * Temperature,
|
153
|
+
# * Humidity,
|
154
|
+
# * Wind Speed,
|
155
|
+
# * Gust Speed,
|
156
|
+
# * Rain Fall,
|
157
|
+
# * Wind Direction,
|
158
|
+
# * Battery Low (true if battery is low) and
|
159
|
+
# * Last Change (seconds since the reception of this data).
|
160
160
|
def get_station_data(identifier)
|
161
161
|
send_request FUNCTION_GET_STATION_DATA, [identifier], 'C', 19, 's C L L L C ? S'
|
162
162
|
end
|
@@ -166,14 +166,14 @@ module Tinkerforge
|
|
166
166
|
#
|
167
167
|
# The return values are:
|
168
168
|
#
|
169
|
-
# * Temperature
|
170
|
-
# * Humidity
|
171
|
-
# * Last Change (
|
169
|
+
# * Temperature,
|
170
|
+
# * Humidity and
|
171
|
+
# * Last Change (seconds since the last reception of data).
|
172
172
|
def get_sensor_data(identifier)
|
173
173
|
send_request FUNCTION_GET_SENSOR_DATA, [identifier], 'C', 5, 's C S'
|
174
174
|
end
|
175
175
|
|
176
|
-
# Turns callback for station data on or off.
|
176
|
+
# Turns callback for station data on or off.
|
177
177
|
def set_station_callback_configuration(enable_callback)
|
178
178
|
send_request FUNCTION_SET_STATION_CALLBACK_CONFIGURATION, [enable_callback], '?', 0, ''
|
179
179
|
end
|
@@ -183,7 +183,7 @@ module Tinkerforge
|
|
183
183
|
send_request FUNCTION_GET_STATION_CALLBACK_CONFIGURATION, [], '', 1, '?'
|
184
184
|
end
|
185
185
|
|
186
|
-
# Turns callback for sensor data on or off.
|
186
|
+
# Turns callback for sensor data on or off.
|
187
187
|
def set_sensor_callback_configuration(enable_callback)
|
188
188
|
send_request FUNCTION_SET_SENSOR_CALLBACK_CONFIGURATION, [enable_callback], '?', 0, ''
|
189
189
|
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 #
|
@@ -99,7 +99,7 @@ module Tinkerforge
|
|
99
99
|
|
100
100
|
end
|
101
101
|
|
102
|
-
# Returns the particulate matter concentration
|
102
|
+
# Returns the particulate matter concentration, broken down as:
|
103
103
|
#
|
104
104
|
# * PM\ :sub:`1.0`\ ,
|
105
105
|
# * PM\ :sub:`2.5`\ and
|
@@ -107,6 +107,10 @@ module Tinkerforge
|
|
107
107
|
#
|
108
108
|
# If the sensor is disabled (see BrickletParticulateMatter#set_enable) then the last known good
|
109
109
|
# values from the sensor are returned.
|
110
|
+
#
|
111
|
+
# If you want to get the values periodically, it is recommended to use the
|
112
|
+
# CALLBACK_PM_CONCENTRATION callback. You can set the callback configuration
|
113
|
+
# with BrickletParticulateMatter#set_pm_concentration_callback_configuration.
|
110
114
|
def get_pm_concentration
|
111
115
|
send_request FUNCTION_GET_PM_CONCENTRATION, [], '', 6, 'S S S'
|
112
116
|
end
|
@@ -123,6 +127,10 @@ module Tinkerforge
|
|
123
127
|
#
|
124
128
|
# If the sensor is disabled (see BrickletParticulateMatter#set_enable) then the last known good
|
125
129
|
# value from the sensor is returned.
|
130
|
+
#
|
131
|
+
# If you want to get the values periodically, it is recommended to use the
|
132
|
+
# CALLBACK_PM_COUNT callback. You can set the callback configuration
|
133
|
+
# with BrickletParticulateMatter#set_pm_count_callback_configuration.
|
126
134
|
def get_pm_count
|
127
135
|
send_request FUNCTION_GET_PM_COUNT, [], '', 12, 'S S S S S S'
|
128
136
|
end
|
@@ -155,7 +163,7 @@ module Tinkerforge
|
|
155
163
|
send_request FUNCTION_GET_SENSOR_INFO, [], '', 4, 'C C C C'
|
156
164
|
end
|
157
165
|
|
158
|
-
# The period
|
166
|
+
# The period is the period with which the CALLBACK_PM_CONCENTRATION
|
159
167
|
# callback is triggered periodically. A value of 0 turns the callback off.
|
160
168
|
#
|
161
169
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -164,8 +172,6 @@ module Tinkerforge
|
|
164
172
|
#
|
165
173
|
# If it is set to false, the callback is continuously triggered with the period,
|
166
174
|
# independent of the value.
|
167
|
-
#
|
168
|
-
# The default value is (0, false).
|
169
175
|
def set_pm_concentration_callback_configuration(period, value_has_to_change)
|
170
176
|
send_request FUNCTION_SET_PM_CONCENTRATION_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
171
177
|
end
|
@@ -176,7 +182,7 @@ module Tinkerforge
|
|
176
182
|
send_request FUNCTION_GET_PM_CONCENTRATION_CALLBACK_CONFIGURATION, [], '', 5, 'L ?'
|
177
183
|
end
|
178
184
|
|
179
|
-
# The period
|
185
|
+
# The period is the period with which the CALLBACK_PM_COUNT callback
|
180
186
|
# is triggered periodically. A value of 0 turns the callback off.
|
181
187
|
#
|
182
188
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -185,8 +191,6 @@ module Tinkerforge
|
|
185
191
|
#
|
186
192
|
# If it is set to false, the callback is continuously triggered with the period,
|
187
193
|
# independent of the value.
|
188
|
-
#
|
189
|
-
# The default value is (0, false).
|
190
194
|
def set_pm_count_callback_configuration(period, value_has_to_change)
|
191
195
|
send_request FUNCTION_SET_PM_COUNT_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
|
192
196
|
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 #
|
@@ -43,8 +43,7 @@ module Tinkerforge
|
|
43
43
|
|
44
44
|
end
|
45
45
|
|
46
|
-
# Beeps
|
47
|
-
# the piezo buzzer will beep for one second.
|
46
|
+
# Beeps for the given duration.
|
48
47
|
def beep(duration)
|
49
48
|
send_request FUNCTION_BEEP, [duration], 'L', 0, ''
|
50
49
|
end
|
@@ -56,8 +55,6 @@ module Tinkerforge
|
|
56
55
|
# For example: If you set the string "...---...", the piezo buzzer will beep
|
57
56
|
# nine times with the durations "short short short long long long short
|
58
57
|
# short short".
|
59
|
-
#
|
60
|
-
# The maximum string size is 60.
|
61
58
|
def morse_code(morse)
|
62
59
|
send_request FUNCTION_MORSE_CODE, [morse], 'Z60', 0, ''
|
63
60
|
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 #
|
@@ -47,17 +47,12 @@ module Tinkerforge
|
|
47
47
|
|
48
48
|
end
|
49
49
|
|
50
|
-
# Beeps with the given frequency for the duration
|
51
|
-
# If you set a duration of 1000, with a frequency value of 2000
|
52
|
-
# the piezo buzzer will beep for one second with a frequency of
|
53
|
-
# approximately 2 kHz.
|
50
|
+
# Beeps with the given frequency for the given duration.
|
54
51
|
#
|
55
52
|
# .. versionchanged:: 2.0.2$nbsp;(Plugin)
|
56
53
|
# A duration of 0 stops the current beep if any, the frequency parameter is
|
57
54
|
# ignored. A duration of 4294967295 results in an infinite beep.
|
58
55
|
#
|
59
|
-
# The *frequency* parameter can be set between 585 and 7100.
|
60
|
-
#
|
61
56
|
# The Piezo Speaker Bricklet can only approximate the frequency, it will play
|
62
57
|
# the best possible match by applying the calibration (see BrickletPiezoSpeaker#calibrate).
|
63
58
|
def beep(duration, frequency)
|
@@ -67,13 +62,10 @@ module Tinkerforge
|
|
67
62
|
# Sets morse code that will be played by the piezo buzzer. The morse code
|
68
63
|
# is given as a string consisting of "." (dot), "-" (minus) and " " (space)
|
69
64
|
# for *dits*, *dahs* and *pauses*. Every other character is ignored.
|
70
|
-
# The second parameter is the frequency (see BrickletPiezoSpeaker#beep).
|
71
65
|
#
|
72
66
|
# For example: If you set the string "...---...", the piezo buzzer will beep
|
73
67
|
# nine times with the durations "short short short long long long short
|
74
68
|
# short short".
|
75
|
-
#
|
76
|
-
# The maximum string size is 60.
|
77
69
|
def morse_code(morse, frequency)
|
78
70
|
send_request FUNCTION_MORSE_CODE, [morse, frequency], 'Z60 S', 0, ''
|
79
71
|
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 #
|
@@ -91,28 +91,18 @@ module Tinkerforge
|
|
91
91
|
|
92
92
|
end
|
93
93
|
|
94
|
-
# Beeps with the given frequency and volume for the duration
|
95
|
-
#
|
96
|
-
# For example: If you set a duration of 1000, with a volume of 10 and a frequency
|
97
|
-
# value of 2000 the piezo buzzer will beep with maximum loudness for one
|
98
|
-
# second with a frequency of 2 kHz.
|
94
|
+
# Beeps with the given frequency and volume for the duration.
|
99
95
|
#
|
100
96
|
# A duration of 0 stops the current beep if any is ongoing.
|
101
97
|
# A duration of 4294967295 results in an infinite beep.
|
102
|
-
#
|
103
|
-
# The ranges are:
|
104
|
-
#
|
105
|
-
# * Frequency: 50Hz - 15000Hz
|
106
|
-
# * Volume: 0 - 10
|
107
|
-
# * Duration: 0ms - 4294967295ms
|
108
98
|
def set_beep(frequency, volume, duration)
|
109
99
|
send_request FUNCTION_SET_BEEP, [frequency, volume, duration], 'S C L', 0, ''
|
110
100
|
end
|
111
101
|
|
112
|
-
# Returns the last beep settings as set by BrickletPiezoSpeakerV2#set_beep. If a beep is currently
|
113
|
-
# running it also returns the remaining duration of the beep
|
102
|
+
# Returns the last beep settings as set by BrickletPiezoSpeakerV2#set_beep. If a beep is currently
|
103
|
+
# running it also returns the remaining duration of the beep.
|
114
104
|
#
|
115
|
-
# If the frequency or volume is updated during a beep (with BrickletPiezoSpeakerV2#update_frequency
|
105
|
+
# If the frequency or volume is updated during a beep (with BrickletPiezoSpeakerV2#update_frequency
|
116
106
|
# or BrickletPiezoSpeakerV2#update_volume) this function returns the updated value.
|
117
107
|
def get_beep
|
118
108
|
send_request FUNCTION_GET_BEEP, [], '', 11, 'S C L L'
|
@@ -164,11 +154,11 @@ module Tinkerforge
|
|
164
154
|
send_request FUNCTION_SET_ALARM, [start_frequency, end_frequency, step_size, step_delay, volume, duration], 'S S S S C L', 0, ''
|
165
155
|
end
|
166
156
|
|
167
|
-
# Returns the last alarm settings as set by BrickletPiezoSpeakerV2#set_alarm. If an alarm is currently
|
157
|
+
# Returns the last alarm settings as set by BrickletPiezoSpeakerV2#set_alarm. If an alarm is currently
|
168
158
|
# running it also returns the remaining duration of the alarm in ms as well as the
|
169
159
|
# current frequency of the alarm in Hz.
|
170
160
|
#
|
171
|
-
# If the volume is updated during a beep (with BrickletPiezoSpeakerV2#update_volume)
|
161
|
+
# If the volume is updated during a beep (with BrickletPiezoSpeakerV2#update_volume)
|
172
162
|
# this function returns the updated value.
|
173
163
|
def get_alarm
|
174
164
|
send_request FUNCTION_GET_ALARM, [], '', 19, 'S S S S C L L S'
|
@@ -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 #
|
@@ -148,13 +148,11 @@ module Tinkerforge
|
|
148
148
|
send_request FUNCTION_GET_RESISTANCE, [], '', 4, 'l'
|
149
149
|
end
|
150
150
|
|
151
|
-
# Sets the period
|
151
|
+
# Sets the period with which the CALLBACK_TEMPERATURE callback is triggered
|
152
152
|
# periodically. A value of 0 turns the callback off.
|
153
153
|
#
|
154
154
|
# The CALLBACK_TEMPERATURE callback is only triggered if the temperature has
|
155
155
|
# changed since the last triggering.
|
156
|
-
#
|
157
|
-
# The default value is 0.
|
158
156
|
def set_temperature_callback_period(period)
|
159
157
|
send_request FUNCTION_SET_TEMPERATURE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
160
158
|
end
|
@@ -164,13 +162,11 @@ module Tinkerforge
|
|
164
162
|
send_request FUNCTION_GET_TEMPERATURE_CALLBACK_PERIOD, [], '', 4, 'L'
|
165
163
|
end
|
166
164
|
|
167
|
-
# Sets the period
|
165
|
+
# Sets the period with which the CALLBACK_RESISTANCE callback is triggered
|
168
166
|
# periodically. A value of 0 turns the callback off.
|
169
167
|
#
|
170
168
|
# The CALLBACK_RESISTANCE callback is only triggered if the resistance has changed
|
171
169
|
# since the last triggering.
|
172
|
-
#
|
173
|
-
# The default value is 0.
|
174
170
|
def set_resistance_callback_period(period)
|
175
171
|
send_request FUNCTION_SET_RESISTANCE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
176
172
|
end
|
@@ -224,7 +220,7 @@ module Tinkerforge
|
|
224
220
|
send_request FUNCTION_GET_RESISTANCE_CALLBACK_THRESHOLD, [], '', 9, 'k l l'
|
225
221
|
end
|
226
222
|
|
227
|
-
# Sets the period
|
223
|
+
# Sets the period with which the threshold callback
|
228
224
|
#
|
229
225
|
# * CALLBACK_TEMPERATURE_REACHED,
|
230
226
|
# * CALLBACK_RESISTANCE_REACHED
|
@@ -235,8 +231,6 @@ module Tinkerforge
|
|
235
231
|
# * BrickletPTC#set_resistance_callback_threshold
|
236
232
|
#
|
237
233
|
# keeps being reached.
|
238
|
-
#
|
239
|
-
# The default value is 100.
|
240
234
|
def set_debounce_period(debounce)
|
241
235
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
242
236
|
end
|