tinkerforge 2.1.4 → 2.1.6

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.
Files changed (63) hide show
  1. data/lib/tinkerforge/brick_dc.rb +42 -4
  2. data/lib/tinkerforge/brick_imu.rb +49 -11
  3. data/lib/tinkerforge/brick_imu_v2.rb +506 -0
  4. data/lib/tinkerforge/brick_master.rb +86 -46
  5. data/lib/tinkerforge/brick_red.rb +36 -5
  6. data/lib/tinkerforge/brick_servo.rb +53 -15
  7. data/lib/tinkerforge/brick_stepper.rb +43 -14
  8. data/lib/tinkerforge/bricklet_accelerometer.rb +229 -0
  9. data/lib/tinkerforge/bricklet_ambient_light.rb +10 -9
  10. data/lib/tinkerforge/bricklet_ambient_light_v2.rb +216 -0
  11. data/lib/tinkerforge/bricklet_analog_in.rb +13 -12
  12. data/lib/tinkerforge/bricklet_analog_in_v2.rb +259 -0
  13. data/lib/tinkerforge/bricklet_analog_out.rb +5 -4
  14. data/lib/tinkerforge/bricklet_analog_out_v2.rb +66 -0
  15. data/lib/tinkerforge/bricklet_barometer.rb +11 -9
  16. data/lib/tinkerforge/bricklet_color.rb +11 -9
  17. data/lib/tinkerforge/bricklet_current12.rb +5 -4
  18. data/lib/tinkerforge/bricklet_current25.rb +5 -4
  19. data/lib/tinkerforge/bricklet_distance_ir.rb +8 -7
  20. data/lib/tinkerforge/bricklet_distance_us.rb +9 -8
  21. data/lib/tinkerforge/bricklet_dual_button.rb +5 -4
  22. data/lib/tinkerforge/bricklet_dual_relay.rb +5 -4
  23. data/lib/tinkerforge/bricklet_dust_detector.rb +178 -0
  24. data/lib/tinkerforge/bricklet_gps.rb +6 -5
  25. data/lib/tinkerforge/bricklet_hall_effect.rb +5 -4
  26. data/lib/tinkerforge/bricklet_humidity.rb +8 -7
  27. data/lib/tinkerforge/bricklet_industrial_analog_out.rb +137 -0
  28. data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +8 -7
  29. data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +5 -4
  30. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +6 -5
  31. data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +209 -0
  32. data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +5 -4
  33. data/lib/tinkerforge/bricklet_io16.rb +8 -7
  34. data/lib/tinkerforge/bricklet_io4.rb +8 -7
  35. data/lib/tinkerforge/bricklet_joystick.rb +5 -4
  36. data/lib/tinkerforge/bricklet_laser_range_finder.rb +324 -0
  37. data/lib/tinkerforge/bricklet_lcd_16x2.rb +7 -6
  38. data/lib/tinkerforge/bricklet_lcd_20x4.rb +11 -10
  39. data/lib/tinkerforge/bricklet_led_strip.rb +12 -10
  40. data/lib/tinkerforge/bricklet_line.rb +5 -4
  41. data/lib/tinkerforge/bricklet_linear_poti.rb +8 -7
  42. data/lib/tinkerforge/bricklet_load_cell.rb +261 -0
  43. data/lib/tinkerforge/bricklet_moisture.rb +6 -5
  44. data/lib/tinkerforge/bricklet_motion_detector.rb +5 -4
  45. data/lib/tinkerforge/bricklet_multi_touch.rb +5 -4
  46. data/lib/tinkerforge/bricklet_nfc_rfid.rb +38 -46
  47. data/lib/tinkerforge/bricklet_piezo_buzzer.rb +5 -4
  48. data/lib/tinkerforge/bricklet_piezo_speaker.rb +6 -5
  49. data/lib/tinkerforge/bricklet_ptc.rb +5 -4
  50. data/lib/tinkerforge/bricklet_remote_switch.rb +9 -8
  51. data/lib/tinkerforge/bricklet_rotary_encoder.rb +5 -4
  52. data/lib/tinkerforge/bricklet_rotary_poti.rb +5 -4
  53. data/lib/tinkerforge/bricklet_rs232.rb +183 -0
  54. data/lib/tinkerforge/bricklet_segment_display_4x7.rb +8 -5
  55. data/lib/tinkerforge/bricklet_solid_state_relay.rb +5 -4
  56. data/lib/tinkerforge/bricklet_sound_intensity.rb +6 -5
  57. data/lib/tinkerforge/bricklet_temperature.rb +7 -6
  58. data/lib/tinkerforge/bricklet_temperature_ir.rb +7 -6
  59. data/lib/tinkerforge/bricklet_tilt.rb +5 -4
  60. data/lib/tinkerforge/bricklet_voltage.rb +8 -7
  61. data/lib/tinkerforge/bricklet_voltage_current.rb +5 -4
  62. data/lib/tinkerforge/version.rb +1 -1
  63. metadata +13 -2
@@ -1,18 +1,19 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2014-12-10. #
3
+ # This file was automatically generated on 2015-11-17. #
4
4
  # #
5
- # Bindings Version 2.1.4 #
5
+ # Bindings Version 2.1.6 #
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 #
9
- # to the generator git on tinkerforge.com #
9
+ # to the generators git repository on tinkerforge.com #
10
10
  #############################################################
11
11
 
12
12
  module Tinkerforge
13
- # Device for controling four 7-segment displays
13
+ # Four 7-segment displays with switchable colon
14
14
  class BrickletSegmentDisplay4x7 < Device
15
15
  DEVICE_IDENTIFIER = 237 # :nodoc:
16
+ DEVICE_DISPLAY_NAME = 'Segment Display 4x7 Bricklet' # :nodoc:
16
17
 
17
18
  # This callback is triggered when the counter (see BrickletSegmentDisplay4x7#start_counter) is
18
19
  # finished.
@@ -70,12 +71,14 @@ module Tinkerforge
70
71
  # The *length* of the increment is given in ms.
71
72
  #
72
73
  # Example: If you set *from* to 0, *to* to 100, *increment* to 1 and
73
- # *length* to 1000, a counter that goes from 0 to 100 with 1 second
74
+ # *length* to 1000, a counter that goes from 0 to 100 with one second
74
75
  # pause between each increment will be started.
75
76
  #
76
77
  # The maximum values for *from*, *to* and *increment* is 9999,
77
78
  # the minimum value is -999.
78
79
  #
80
+ # Using a negative increment allows to count backwards.
81
+ #
79
82
  # You can stop the counter at every time by calling BrickletSegmentDisplay4x7#set_segments.
80
83
  def start_counter(value_from, value_to, increment, length)
81
84
  send_request(FUNCTION_START_COUNTER, [value_from, value_to, increment, length], 's s s L', 0, '')
@@ -1,18 +1,19 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2014-12-10. #
3
+ # This file was automatically generated on 2015-11-17. #
4
4
  # #
5
- # Bindings Version 2.1.4 #
5
+ # Bindings Version 2.1.6 #
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 #
9
- # to the generator git on tinkerforge.com #
9
+ # to the generators git repository on tinkerforge.com #
10
10
  #############################################################
11
11
 
12
12
  module Tinkerforge
13
- # Device for controlling AC and DC Solid State Relays
13
+ # Controls AC and DC Solid State Relays
14
14
  class BrickletSolidStateRelay < Device
15
15
  DEVICE_IDENTIFIER = 244 # :nodoc:
16
+ DEVICE_DISPLAY_NAME = 'Solid State Relay Bricklet' # :nodoc:
16
17
 
17
18
  # This callback is triggered whenever the monoflop timer reaches 0.
18
19
  # The parameter is the current state of the relay
@@ -1,18 +1,19 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2014-12-10. #
3
+ # This file was automatically generated on 2015-11-17. #
4
4
  # #
5
- # Bindings Version 2.1.4 #
5
+ # Bindings Version 2.1.6 #
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 #
9
- # to the generator git on tinkerforge.com #
9
+ # to the generators git repository on tinkerforge.com #
10
10
  #############################################################
11
11
 
12
12
  module Tinkerforge
13
- # Device for sensing sound intensity
13
+ # Measures sound intensity
14
14
  class BrickletSoundIntensity < Device
15
15
  DEVICE_IDENTIFIER = 238 # :nodoc:
16
+ DEVICE_DISPLAY_NAME = 'Sound Intensity Bricklet' # :nodoc:
16
17
 
17
18
  # This callback is triggered periodically with the period that is set by
18
19
  # BrickletSoundIntensity#set_intensity_callback_period. The parameter is the intensity of
@@ -70,7 +71,7 @@ module Tinkerforge
70
71
  # Returns the current sound intensity. The value has a range of
71
72
  # 0 to 4095.
72
73
  #
73
- # The value corresponds to the `upper envelop <http://en.wikipedia.org/wiki/Envelope_(waves)>`__
74
+ # The value corresponds to the `upper envelop <https://en.wikipedia.org/wiki/Envelope_(waves)>`__
74
75
  # of the signal of the microphone capsule.
75
76
  #
76
77
  # If you want to get the intensity periodically, it is recommended to use the
@@ -1,18 +1,19 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2014-12-10. #
3
+ # This file was automatically generated on 2015-11-17. #
4
4
  # #
5
- # Bindings Version 2.1.4 #
5
+ # Bindings Version 2.1.6 #
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 #
9
- # to the generator git on tinkerforge.com #
9
+ # to the generators git repository on tinkerforge.com #
10
10
  #############################################################
11
11
 
12
12
  module Tinkerforge
13
- # Device for sensing Temperature
13
+ # Measures ambient temperature with 0.5°C accuracy
14
14
  class BrickletTemperature < Device
15
15
  DEVICE_IDENTIFIER = 216 # :nodoc:
16
+ DEVICE_DISPLAY_NAME = 'Temperature Bricklet' # :nodoc:
16
17
 
17
18
  # This callback is triggered periodically with the period that is set by
18
19
  # BrickletTemperature#set_temperature_callback_period. The parameter is the temperature
@@ -154,14 +155,14 @@ module Tinkerforge
154
155
  # It is however not recommended to lower the I2C speed in applications where
155
156
  # a high throughput needs to be achieved.
156
157
  #
157
- # .. versionadded:: 2.0.1~(Plugin)
158
+ # .. versionadded:: 2.0.1$nbsp;(Plugin)
158
159
  def set_i2c_mode(mode)
159
160
  send_request(FUNCTION_SET_I2C_MODE, [mode], 'C', 0, '')
160
161
  end
161
162
 
162
163
  # Returns the I2C mode as set by BrickletTemperature#set_i2c_mode.
163
164
  #
164
- # .. versionadded:: 2.0.1~(Plugin)
165
+ # .. versionadded:: 2.0.1$nbsp;(Plugin)
165
166
  def get_i2c_mode
166
167
  send_request(FUNCTION_GET_I2C_MODE, [], '', 1, 'C')
167
168
  end
@@ -1,18 +1,19 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2014-12-10. #
3
+ # This file was automatically generated on 2015-11-17. #
4
4
  # #
5
- # Bindings Version 2.1.4 #
5
+ # Bindings Version 2.1.6 #
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 #
9
- # to the generator git on tinkerforge.com #
9
+ # to the generators git repository on tinkerforge.com #
10
10
  #############################################################
11
11
 
12
12
  module Tinkerforge
13
- # Device for non-contact temperature sensing
13
+ # Measures contactless object temperature between -70°C and +380°C
14
14
  class BrickletTemperatureIR < Device
15
15
  DEVICE_IDENTIFIER = 217 # :nodoc:
16
+ DEVICE_DISPLAY_NAME = 'Temperature IR Bricklet' # :nodoc:
16
17
 
17
18
  # This callback is triggered periodically with the period that is set by
18
19
  # BrickletTemperatureIR#set_ambient_temperature_callback_period. The parameter is the ambient
@@ -120,7 +121,7 @@ module Tinkerforge
120
121
  # on the surface of the object.
121
122
  #
122
123
  # The temperature of different materials is dependent on their `emissivity
123
- # <http://en.wikipedia.org/wiki/Emissivity>`__. The emissivity of the material
124
+ # <https://en.wikipedia.org/wiki/Emissivity>`__. The emissivity of the material
124
125
  # can be set with BrickletTemperatureIR#set_emissivity.
125
126
  #
126
127
  # If you want to get the object temperature periodically, it is recommended
@@ -130,7 +131,7 @@ module Tinkerforge
130
131
  send_request(FUNCTION_GET_OBJECT_TEMPERATURE, [], '', 2, 's')
131
132
  end
132
133
 
133
- # Sets the `emissivity <http://en.wikipedia.org/wiki/Emissivity>`__ that is
134
+ # Sets the `emissivity <https://en.wikipedia.org/wiki/Emissivity>`__ that is
134
135
  # used to calculate the surface temperature as returned by
135
136
  # BrickletTemperatureIR#get_object_temperature.
136
137
  #
@@ -1,18 +1,19 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2014-12-10. #
3
+ # This file was automatically generated on 2015-11-17. #
4
4
  # #
5
- # Bindings Version 2.1.4 #
5
+ # Bindings Version 2.1.6 #
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 #
9
- # to the generator git on tinkerforge.com #
9
+ # to the generators git repository on tinkerforge.com #
10
10
  #############################################################
11
11
 
12
12
  module Tinkerforge
13
- # Device for sensing tilt and vibration
13
+ # Detects inclination of Bricklet (tilt switch open/closed)
14
14
  class BrickletTilt < Device
15
15
  DEVICE_IDENTIFIER = 239 # :nodoc:
16
+ DEVICE_DISPLAY_NAME = 'Tilt Bricklet' # :nodoc:
16
17
 
17
18
  # This callback provides the current tilt state. It is called every time the
18
19
  # state changes.
@@ -1,18 +1,19 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2014-12-10. #
3
+ # This file was automatically generated on 2015-11-17. #
4
4
  # #
5
- # Bindings Version 2.1.4 #
5
+ # Bindings Version 2.1.6 #
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 #
9
- # to the generator git on tinkerforge.com #
9
+ # to the generators git repository on tinkerforge.com #
10
10
  #############################################################
11
11
 
12
12
  module Tinkerforge
13
- # Device for sensing Voltages between 0 and 50V
13
+ # Measures DC voltage between 0V and 50V
14
14
  class BrickletVoltage < Device
15
15
  DEVICE_IDENTIFIER = 218 # :nodoc:
16
+ DEVICE_DISPLAY_NAME = 'Voltage Bricklet' # :nodoc:
16
17
 
17
18
  # This callback is triggered periodically with the period that is set by
18
19
  # BrickletVoltage#set_voltage_callback_period. The parameter is the voltage of the
@@ -71,7 +72,7 @@ module Tinkerforge
71
72
  def initialize(uid, ipcon)
72
73
  super uid, ipcon
73
74
 
74
- @api_version = [2, 0, 0]
75
+ @api_version = [2, 0, 1]
75
76
 
76
77
  @response_expected[FUNCTION_GET_VOLTAGE] = RESPONSE_EXPECTED_ALWAYS_TRUE
77
78
  @response_expected[FUNCTION_GET_ANALOG_VALUE] = RESPONSE_EXPECTED_ALWAYS_TRUE
@@ -169,12 +170,12 @@ module Tinkerforge
169
170
  #
170
171
  # The default value is ('x', 0, 0).
171
172
  def set_voltage_callback_threshold(option, min, max)
172
- send_request(FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD, [option, min, max], 'k s s', 0, '')
173
+ send_request(FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, '')
173
174
  end
174
175
 
175
176
  # Returns the threshold as set by BrickletVoltage#set_voltage_callback_threshold.
176
177
  def get_voltage_callback_threshold
177
- send_request(FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD, [], '', 5, 'k s s')
178
+ send_request(FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD, [], '', 5, 'k S S')
178
179
  end
179
180
 
180
181
  # Sets the thresholds for the CALLBACK_ANALOG_VALUE_REACHED callback.
@@ -1,18 +1,19 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2014-12-10. #
3
+ # This file was automatically generated on 2015-11-17. #
4
4
  # #
5
- # Bindings Version 2.1.4 #
5
+ # Bindings Version 2.1.6 #
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 #
9
- # to the generator git on tinkerforge.com #
9
+ # to the generators git repository on tinkerforge.com #
10
10
  #############################################################
11
11
 
12
12
  module Tinkerforge
13
- # Device for high precision sensing of voltage and current
13
+ # Measures power, DC voltage and DC current up to 720W/36V/20A
14
14
  class BrickletVoltageCurrent < Device
15
15
  DEVICE_IDENTIFIER = 227 # :nodoc:
16
+ DEVICE_DISPLAY_NAME = 'Voltage/Current Bricklet' # :nodoc:
16
17
 
17
18
  # This callback is triggered periodically with the period that is set by
18
19
  # BrickletVoltageCurrent#set_current_callback_period. The parameter is the current of the
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Tinkerforge
3
- VERSION = '2.1.4'
3
+ VERSION = '2.1.6'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinkerforge
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ version: 2.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-10 00:00:00.000000000 Z
12
+ date: 2015-11-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: matthias@tinkerforge.com
@@ -25,6 +25,7 @@ files:
25
25
  - lib/tinkerforge/bricklet_solid_state_relay.rb
26
26
  - lib/tinkerforge/bricklet_current25.rb
27
27
  - lib/tinkerforge/bricklet_piezo_speaker.rb
28
+ - lib/tinkerforge/bricklet_analog_out_v2.rb
28
29
  - lib/tinkerforge/bricklet_rotary_encoder.rb
29
30
  - lib/tinkerforge/bricklet_led_strip.rb
30
31
  - lib/tinkerforge/bricklet_lcd_20x4.rb
@@ -35,31 +36,40 @@ files:
35
36
  - lib/tinkerforge/bricklet_distance_ir.rb
36
37
  - lib/tinkerforge/bricklet_rotary_poti.rb
37
38
  - lib/tinkerforge/bricklet_hall_effect.rb
39
+ - lib/tinkerforge/bricklet_rs232.rb
38
40
  - lib/tinkerforge/bricklet_moisture.rb
39
41
  - lib/tinkerforge/bricklet_multi_touch.rb
40
42
  - lib/tinkerforge/bricklet_analog_out.rb
41
43
  - lib/tinkerforge/brick_imu.rb
44
+ - lib/tinkerforge/brick_imu_v2.rb
42
45
  - lib/tinkerforge/brick_dc.rb
43
46
  - lib/tinkerforge/bricklet_motion_detector.rb
44
47
  - lib/tinkerforge/bricklet_line.rb
45
48
  - lib/tinkerforge/bricklet_joystick.rb
49
+ - lib/tinkerforge/bricklet_dust_detector.rb
46
50
  - lib/tinkerforge/bricklet_nfc_rfid.rb
47
51
  - lib/tinkerforge/ip_connection.rb
48
52
  - lib/tinkerforge/bricklet_lcd_16x2.rb
49
53
  - lib/tinkerforge/bricklet_color.rb
50
54
  - lib/tinkerforge/bricklet_dual_relay.rb
55
+ - lib/tinkerforge/bricklet_ambient_light_v2.rb
51
56
  - lib/tinkerforge/bricklet_remote_switch.rb
57
+ - lib/tinkerforge/bricklet_analog_in_v2.rb
52
58
  - lib/tinkerforge/bricklet_sound_intensity.rb
53
59
  - lib/tinkerforge/brick_servo.rb
60
+ - lib/tinkerforge/bricklet_laser_range_finder.rb
54
61
  - lib/tinkerforge/brick_master.rb
62
+ - lib/tinkerforge/bricklet_accelerometer.rb
55
63
  - lib/tinkerforge/bricklet_industrial_digital_in_4.rb
56
64
  - lib/tinkerforge/bricklet_tilt.rb
57
65
  - lib/tinkerforge/brick_stepper.rb
58
66
  - lib/tinkerforge/bricklet_io4.rb
59
67
  - lib/tinkerforge/bricklet_analog_in.rb
68
+ - lib/tinkerforge/bricklet_industrial_dual_analog_in.rb
60
69
  - lib/tinkerforge/brick_red.rb
61
70
  - lib/tinkerforge/bricklet_temperature_ir.rb
62
71
  - lib/tinkerforge/bricklet_dual_button.rb
72
+ - lib/tinkerforge/bricklet_load_cell.rb
63
73
  - lib/tinkerforge/bricklet_segment_display_4x7.rb
64
74
  - lib/tinkerforge/bricklet_distance_us.rb
65
75
  - lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb
@@ -67,6 +77,7 @@ files:
67
77
  - lib/tinkerforge/bricklet_piezo_buzzer.rb
68
78
  - lib/tinkerforge/bricklet_voltage_current.rb
69
79
  - lib/tinkerforge/bricklet_voltage.rb
80
+ - lib/tinkerforge/bricklet_industrial_analog_out.rb
70
81
  - lib/tinkerforge/version.rb
71
82
  - lib/tinkerforge/bricklet_io16.rb
72
83
  - lib/tinkerforge/bricklet_barometer.rb