tinkerforge 2.1.17 → 2.1.18

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 (120) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tinkerforge/brick_dc.rb +6 -6
  3. data/lib/tinkerforge/brick_imu.rb +6 -6
  4. data/lib/tinkerforge/brick_imu_v2.rb +13 -6
  5. data/lib/tinkerforge/brick_master.rb +6 -6
  6. data/lib/tinkerforge/brick_red.rb +2 -2
  7. data/lib/tinkerforge/brick_servo.rb +9 -7
  8. data/lib/tinkerforge/brick_silent_stepper.rb +13 -13
  9. data/lib/tinkerforge/brick_stepper.rb +6 -6
  10. data/lib/tinkerforge/bricklet_accelerometer.rb +2 -2
  11. data/lib/tinkerforge/bricklet_air_quality.rb +514 -0
  12. data/lib/tinkerforge/bricklet_ambient_light.rb +2 -2
  13. data/lib/tinkerforge/bricklet_ambient_light_v2.rb +2 -2
  14. data/lib/tinkerforge/bricklet_analog_in.rb +2 -2
  15. data/lib/tinkerforge/bricklet_analog_in_v2.rb +2 -2
  16. data/lib/tinkerforge/bricklet_analog_in_v3.rb +5 -5
  17. data/lib/tinkerforge/bricklet_analog_out.rb +2 -2
  18. data/lib/tinkerforge/bricklet_analog_out_v2.rb +2 -2
  19. data/lib/tinkerforge/bricklet_analog_out_v3.rb +210 -0
  20. data/lib/tinkerforge/bricklet_barometer.rb +2 -2
  21. data/lib/tinkerforge/bricklet_barometer_v2.rb +497 -0
  22. data/lib/tinkerforge/bricklet_can.rb +2 -2
  23. data/lib/tinkerforge/bricklet_can_v2.rb +5 -5
  24. data/lib/tinkerforge/bricklet_co2.rb +2 -2
  25. data/lib/tinkerforge/bricklet_color.rb +2 -2
  26. data/lib/tinkerforge/bricklet_current12.rb +2 -2
  27. data/lib/tinkerforge/bricklet_current25.rb +2 -2
  28. data/lib/tinkerforge/bricklet_distance_ir.rb +2 -2
  29. data/lib/tinkerforge/bricklet_distance_ir_v2.rb +398 -0
  30. data/lib/tinkerforge/bricklet_distance_us.rb +2 -2
  31. data/lib/tinkerforge/bricklet_dmx.rb +7 -5
  32. data/lib/tinkerforge/bricklet_dual_button.rb +2 -2
  33. data/lib/tinkerforge/bricklet_dual_button_v2.rb +283 -0
  34. data/lib/tinkerforge/bricklet_dual_relay.rb +2 -2
  35. data/lib/tinkerforge/bricklet_dust_detector.rb +2 -2
  36. data/lib/tinkerforge/bricklet_gps.rb +2 -2
  37. data/lib/tinkerforge/bricklet_gps_v2.rb +6 -6
  38. data/lib/tinkerforge/bricklet_hall_effect.rb +2 -2
  39. data/lib/tinkerforge/bricklet_humidity.rb +2 -2
  40. data/lib/tinkerforge/bricklet_humidity_v2.rb +5 -5
  41. data/lib/tinkerforge/bricklet_industrial_analog_out.rb +2 -2
  42. data/lib/tinkerforge/bricklet_industrial_analog_out_v2.rb +336 -0
  43. data/lib/tinkerforge/bricklet_industrial_counter.rb +12 -12
  44. data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +2 -2
  45. data/lib/tinkerforge/bricklet_industrial_digital_in_4_v2.rb +7 -7
  46. data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +2 -2
  47. data/lib/tinkerforge/bricklet_industrial_digital_out_4_v2.rb +302 -0
  48. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +2 -2
  49. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma_v2.rb +382 -0
  50. data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +2 -2
  51. data/lib/tinkerforge/bricklet_industrial_dual_analog_in_v2.rb +374 -0
  52. data/lib/tinkerforge/bricklet_industrial_dual_relay.rb +5 -5
  53. data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +2 -2
  54. data/lib/tinkerforge/bricklet_industrial_quad_relay_v2.rb +11 -11
  55. data/lib/tinkerforge/bricklet_io16.rb +2 -2
  56. data/lib/tinkerforge/bricklet_io16_v2.rb +418 -0
  57. data/lib/tinkerforge/bricklet_io4.rb +2 -2
  58. data/lib/tinkerforge/bricklet_io4_v2.rb +6 -6
  59. data/lib/tinkerforge/bricklet_isolator.rb +282 -0
  60. data/lib/tinkerforge/bricklet_joystick.rb +2 -2
  61. data/lib/tinkerforge/bricklet_laser_range_finder.rb +2 -2
  62. data/lib/tinkerforge/bricklet_lcd_128x64.rb +486 -0
  63. data/lib/tinkerforge/bricklet_lcd_16x2.rb +2 -2
  64. data/lib/tinkerforge/bricklet_lcd_20x4.rb +2 -2
  65. data/lib/tinkerforge/bricklet_led_strip.rb +2 -2
  66. data/lib/tinkerforge/bricklet_led_strip_v2.rb +8 -8
  67. data/lib/tinkerforge/bricklet_line.rb +2 -2
  68. data/lib/tinkerforge/bricklet_linear_poti.rb +2 -2
  69. data/lib/tinkerforge/bricklet_load_cell.rb +2 -2
  70. data/lib/tinkerforge/bricklet_load_cell_v2.rb +5 -5
  71. data/lib/tinkerforge/bricklet_moisture.rb +2 -2
  72. data/lib/tinkerforge/bricklet_motion_detector.rb +2 -2
  73. data/lib/tinkerforge/bricklet_motion_detector_v2.rb +6 -6
  74. data/lib/tinkerforge/bricklet_motorized_linear_poti.rb +5 -5
  75. data/lib/tinkerforge/bricklet_multi_touch.rb +2 -2
  76. data/lib/tinkerforge/bricklet_nfc.rb +6 -6
  77. data/lib/tinkerforge/bricklet_nfc_rfid.rb +2 -2
  78. data/lib/tinkerforge/bricklet_oled_128x64.rb +2 -2
  79. data/lib/tinkerforge/bricklet_oled_128x64_v2.rb +387 -0
  80. data/lib/tinkerforge/bricklet_oled_64x48.rb +2 -2
  81. data/lib/tinkerforge/bricklet_one_wire.rb +305 -0
  82. data/lib/tinkerforge/bricklet_outdoor_weather.rb +5 -5
  83. data/lib/tinkerforge/bricklet_particulate_matter.rb +5 -5
  84. data/lib/tinkerforge/bricklet_piezo_buzzer.rb +2 -2
  85. data/lib/tinkerforge/bricklet_piezo_speaker.rb +2 -2
  86. data/lib/tinkerforge/bricklet_ptc.rb +2 -2
  87. data/lib/tinkerforge/bricklet_ptc_v2.rb +5 -5
  88. data/lib/tinkerforge/bricklet_real_time_clock.rb +2 -2
  89. data/lib/tinkerforge/bricklet_real_time_clock_v2.rb +5 -5
  90. data/lib/tinkerforge/bricklet_remote_switch.rb +2 -2
  91. data/lib/tinkerforge/bricklet_remote_switch_v2.rb +5 -5
  92. data/lib/tinkerforge/bricklet_rgb_led.rb +2 -2
  93. data/lib/tinkerforge/bricklet_rgb_led_button.rb +5 -5
  94. data/lib/tinkerforge/bricklet_rgb_led_matrix.rb +5 -5
  95. data/lib/tinkerforge/bricklet_rotary_encoder.rb +2 -2
  96. data/lib/tinkerforge/bricklet_rotary_encoder_v2.rb +5 -5
  97. data/lib/tinkerforge/bricklet_rotary_poti.rb +2 -2
  98. data/lib/tinkerforge/bricklet_rs232.rb +2 -2
  99. data/lib/tinkerforge/bricklet_rs232_v2.rb +5 -5
  100. data/lib/tinkerforge/bricklet_rs485.rb +5 -5
  101. data/lib/tinkerforge/bricklet_segment_display_4x7.rb +2 -2
  102. data/lib/tinkerforge/bricklet_solid_state_relay.rb +2 -2
  103. data/lib/tinkerforge/bricklet_solid_state_relay_v2.rb +5 -5
  104. data/lib/tinkerforge/bricklet_sound_intensity.rb +2 -2
  105. data/lib/tinkerforge/bricklet_sound_pressure_level.rb +9 -9
  106. data/lib/tinkerforge/bricklet_temperature.rb +2 -2
  107. data/lib/tinkerforge/bricklet_temperature_ir.rb +2 -2
  108. data/lib/tinkerforge/bricklet_temperature_ir_v2.rb +5 -5
  109. data/lib/tinkerforge/bricklet_temperature_v2.rb +278 -0
  110. data/lib/tinkerforge/bricklet_thermal_imaging.rb +5 -5
  111. data/lib/tinkerforge/bricklet_thermocouple.rb +2 -2
  112. data/lib/tinkerforge/bricklet_thermocouple_v2.rb +5 -5
  113. data/lib/tinkerforge/bricklet_tilt.rb +2 -2
  114. data/lib/tinkerforge/bricklet_uv_light.rb +6 -5
  115. data/lib/tinkerforge/bricklet_uv_light_v2.rb +430 -0
  116. data/lib/tinkerforge/bricklet_voltage.rb +2 -2
  117. data/lib/tinkerforge/bricklet_voltage_current.rb +2 -2
  118. data/lib/tinkerforge/bricklet_voltage_current_v2.rb +5 -5
  119. data/lib/tinkerforge/version.rb +1 -1
  120. metadata +18 -2
@@ -0,0 +1,336 @@
1
+ # -*- ruby encoding: utf-8 -*-
2
+ #############################################################
3
+ # This file was automatically generated on 2018-09-28. #
4
+ # #
5
+ # Ruby Bindings Version 2.1.18 #
6
+ # #
7
+ # If you have a bugfix for this file and want to commit it, #
8
+ # please fix the bug in the generator. You can find a link #
9
+ # to the generators git repository on tinkerforge.com #
10
+ #############################################################
11
+
12
+ module Tinkerforge
13
+ # Generates configurable DC voltage and current, 0V to 10V and 4mA to 20mA
14
+ class BrickletIndustrialAnalogOutV2 < Device
15
+ DEVICE_IDENTIFIER = 2116 # :nodoc:
16
+ DEVICE_DISPLAY_NAME = 'Industrial Analog Out Bricklet 2.0' # :nodoc:
17
+
18
+ FUNCTION_SET_ENABLED = 1 # :nodoc:
19
+ FUNCTION_GET_ENABLED = 2 # :nodoc:
20
+ FUNCTION_SET_VOLTAGE = 3 # :nodoc:
21
+ FUNCTION_GET_VOLTAGE = 4 # :nodoc:
22
+ FUNCTION_SET_CURRENT = 5 # :nodoc:
23
+ FUNCTION_GET_CURRENT = 6 # :nodoc:
24
+ FUNCTION_SET_CONFIGURATION = 7 # :nodoc:
25
+ FUNCTION_GET_CONFIGURATION = 8 # :nodoc:
26
+ FUNCTION_SET_OUT_LED_CONFIG = 9 # :nodoc:
27
+ FUNCTION_GET_OUT_LED_CONFIG = 10 # :nodoc:
28
+ FUNCTION_SET_OUT_LED_STATUS_CONFIG = 11 # :nodoc:
29
+ FUNCTION_GET_OUT_LED_STATUS_CONFIG = 12 # :nodoc:
30
+ FUNCTION_GET_SPITFP_ERROR_COUNT = 234 # :nodoc:
31
+ FUNCTION_SET_BOOTLOADER_MODE = 235 # :nodoc:
32
+ FUNCTION_GET_BOOTLOADER_MODE = 236 # :nodoc:
33
+ FUNCTION_SET_WRITE_FIRMWARE_POINTER = 237 # :nodoc:
34
+ FUNCTION_WRITE_FIRMWARE = 238 # :nodoc:
35
+ FUNCTION_SET_STATUS_LED_CONFIG = 239 # :nodoc:
36
+ FUNCTION_GET_STATUS_LED_CONFIG = 240 # :nodoc:
37
+ FUNCTION_GET_CHIP_TEMPERATURE = 242 # :nodoc:
38
+ FUNCTION_RESET = 243 # :nodoc:
39
+ FUNCTION_WRITE_UID = 248 # :nodoc:
40
+ FUNCTION_READ_UID = 249 # :nodoc:
41
+ FUNCTION_GET_IDENTITY = 255 # :nodoc:
42
+
43
+ VOLTAGE_RANGE_0_TO_5V = 0 # :nodoc:
44
+ VOLTAGE_RANGE_0_TO_10V = 1 # :nodoc:
45
+ CURRENT_RANGE_4_TO_20MA = 0 # :nodoc:
46
+ CURRENT_RANGE_0_TO_20MA = 1 # :nodoc:
47
+ CURRENT_RANGE_0_TO_24MA = 2 # :nodoc:
48
+ OUT_LED_CONFIG_OFF = 0 # :nodoc:
49
+ OUT_LED_CONFIG_ON = 1 # :nodoc:
50
+ OUT_LED_CONFIG_SHOW_HEARTBEAT = 2 # :nodoc:
51
+ OUT_LED_CONFIG_SHOW_OUT_STATUS = 3 # :nodoc:
52
+ OUT_LED_STATUS_CONFIG_THRESHOLD = 0 # :nodoc:
53
+ OUT_LED_STATUS_CONFIG_INTENSITY = 1 # :nodoc:
54
+ BOOTLOADER_MODE_BOOTLOADER = 0 # :nodoc:
55
+ BOOTLOADER_MODE_FIRMWARE = 1 # :nodoc:
56
+ BOOTLOADER_MODE_BOOTLOADER_WAIT_FOR_REBOOT = 2 # :nodoc:
57
+ BOOTLOADER_MODE_FIRMWARE_WAIT_FOR_REBOOT = 3 # :nodoc:
58
+ BOOTLOADER_MODE_FIRMWARE_WAIT_FOR_ERASE_AND_REBOOT = 4 # :nodoc:
59
+ BOOTLOADER_STATUS_OK = 0 # :nodoc:
60
+ BOOTLOADER_STATUS_INVALID_MODE = 1 # :nodoc:
61
+ BOOTLOADER_STATUS_NO_CHANGE = 2 # :nodoc:
62
+ BOOTLOADER_STATUS_ENTRY_FUNCTION_NOT_PRESENT = 3 # :nodoc:
63
+ BOOTLOADER_STATUS_DEVICE_IDENTIFIER_INCORRECT = 4 # :nodoc:
64
+ BOOTLOADER_STATUS_CRC_MISMATCH = 5 # :nodoc:
65
+ STATUS_LED_CONFIG_OFF = 0 # :nodoc:
66
+ STATUS_LED_CONFIG_ON = 1 # :nodoc:
67
+ STATUS_LED_CONFIG_SHOW_HEARTBEAT = 2 # :nodoc:
68
+ STATUS_LED_CONFIG_SHOW_STATUS = 3 # :nodoc:
69
+
70
+ # Creates an object with the unique device ID <tt>uid</tt> and adds it to
71
+ # the IP Connection <tt>ipcon</tt>.
72
+ def initialize(uid, ipcon)
73
+ super uid, ipcon
74
+
75
+ @api_version = [2, 0, 0]
76
+
77
+ @response_expected[FUNCTION_SET_ENABLED] = RESPONSE_EXPECTED_FALSE
78
+ @response_expected[FUNCTION_GET_ENABLED] = RESPONSE_EXPECTED_ALWAYS_TRUE
79
+ @response_expected[FUNCTION_SET_VOLTAGE] = RESPONSE_EXPECTED_FALSE
80
+ @response_expected[FUNCTION_GET_VOLTAGE] = RESPONSE_EXPECTED_ALWAYS_TRUE
81
+ @response_expected[FUNCTION_SET_CURRENT] = RESPONSE_EXPECTED_FALSE
82
+ @response_expected[FUNCTION_GET_CURRENT] = RESPONSE_EXPECTED_ALWAYS_TRUE
83
+ @response_expected[FUNCTION_SET_CONFIGURATION] = RESPONSE_EXPECTED_FALSE
84
+ @response_expected[FUNCTION_GET_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
85
+ @response_expected[FUNCTION_SET_OUT_LED_CONFIG] = RESPONSE_EXPECTED_FALSE
86
+ @response_expected[FUNCTION_GET_OUT_LED_CONFIG] = RESPONSE_EXPECTED_ALWAYS_TRUE
87
+ @response_expected[FUNCTION_SET_OUT_LED_STATUS_CONFIG] = RESPONSE_EXPECTED_FALSE
88
+ @response_expected[FUNCTION_GET_OUT_LED_STATUS_CONFIG] = RESPONSE_EXPECTED_ALWAYS_TRUE
89
+ @response_expected[FUNCTION_GET_SPITFP_ERROR_COUNT] = RESPONSE_EXPECTED_ALWAYS_TRUE
90
+ @response_expected[FUNCTION_SET_BOOTLOADER_MODE] = RESPONSE_EXPECTED_ALWAYS_TRUE
91
+ @response_expected[FUNCTION_GET_BOOTLOADER_MODE] = RESPONSE_EXPECTED_ALWAYS_TRUE
92
+ @response_expected[FUNCTION_SET_WRITE_FIRMWARE_POINTER] = RESPONSE_EXPECTED_FALSE
93
+ @response_expected[FUNCTION_WRITE_FIRMWARE] = RESPONSE_EXPECTED_ALWAYS_TRUE
94
+ @response_expected[FUNCTION_SET_STATUS_LED_CONFIG] = RESPONSE_EXPECTED_FALSE
95
+ @response_expected[FUNCTION_GET_STATUS_LED_CONFIG] = RESPONSE_EXPECTED_ALWAYS_TRUE
96
+ @response_expected[FUNCTION_GET_CHIP_TEMPERATURE] = RESPONSE_EXPECTED_ALWAYS_TRUE
97
+ @response_expected[FUNCTION_RESET] = RESPONSE_EXPECTED_FALSE
98
+ @response_expected[FUNCTION_WRITE_UID] = RESPONSE_EXPECTED_FALSE
99
+ @response_expected[FUNCTION_READ_UID] = RESPONSE_EXPECTED_ALWAYS_TRUE
100
+ @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
101
+
102
+
103
+ end
104
+
105
+ # Enables/disables the output of voltage and current.
106
+ #
107
+ # The default is disabled.
108
+ def set_enabled(enabled)
109
+ send_request FUNCTION_SET_ENABLED, [enabled], '?', 0, ''
110
+ end
111
+
112
+ # Returns *true* if output of voltage and current is enabled, *false* otherwise.
113
+ def get_enabled
114
+ send_request FUNCTION_GET_ENABLED, [], '', 1, '?'
115
+ end
116
+
117
+ # Sets the output voltage in mV.
118
+ #
119
+ # The output voltage and output current are linked. Changing the output voltage
120
+ # also changes the output current.
121
+ def set_voltage(voltage)
122
+ send_request FUNCTION_SET_VOLTAGE, [voltage], 'S', 0, ''
123
+ end
124
+
125
+ # Returns the voltage as set by BrickletIndustrialAnalogOutV2#set_voltage.
126
+ def get_voltage
127
+ send_request FUNCTION_GET_VOLTAGE, [], '', 2, 'S'
128
+ end
129
+
130
+ # Sets the output current in µA.
131
+ #
132
+ # The output current and output voltage are linked. Changing the output current
133
+ # also changes the output voltage.
134
+ def set_current(current)
135
+ send_request FUNCTION_SET_CURRENT, [current], 'S', 0, ''
136
+ end
137
+
138
+ # Returns the current as set by BrickletIndustrialAnalogOutV2#set_current.
139
+ def get_current
140
+ send_request FUNCTION_GET_CURRENT, [], '', 2, 'S'
141
+ end
142
+
143
+ # Configures the voltage and current range.
144
+ #
145
+ # Possible voltage ranges are:
146
+ #
147
+ # * 0V to 5V
148
+ # * 0V to 10V (default)
149
+ #
150
+ # Possible current ranges are:
151
+ #
152
+ # * 4mA to 20mA (default)
153
+ # * 0mA to 20mA
154
+ # * 0mA to 24mA
155
+ #
156
+ # The resolution will always be 12 bit. This means, that the
157
+ # precision is higher with a smaller range.
158
+ def set_configuration(voltage_range, current_range)
159
+ send_request FUNCTION_SET_CONFIGURATION, [voltage_range, current_range], 'C C', 0, ''
160
+ end
161
+
162
+ # Returns the configuration as set by BrickletIndustrialAnalogOutV2#set_configuration.
163
+ def get_configuration
164
+ send_request FUNCTION_GET_CONFIGURATION, [], '', 2, 'C C'
165
+ end
166
+
167
+ # You can turn the Out LED off, on or show a
168
+ # heartbeat. You can also set the LED to "Out Status". In this mode the
169
+ # LED can either be turned on with a pre-defined threshold or the intensity
170
+ # of the LED can change with the output value (voltage or current).
171
+ #
172
+ # You can configure the channel status behavior with BrickletIndustrialAnalogOutV2#set_out_led_status_config.
173
+ #
174
+ # By default the LED is configured as "Out Status"
175
+ def set_out_led_config(config)
176
+ send_request FUNCTION_SET_OUT_LED_CONFIG, [config], 'C', 0, ''
177
+ end
178
+
179
+ # Returns the Out LED configuration as set by BrickletIndustrialAnalogOutV2#set_out_led_config
180
+ def get_out_led_config
181
+ send_request FUNCTION_GET_OUT_LED_CONFIG, [], '', 1, 'C'
182
+ end
183
+
184
+ # Sets the Out LED status config. This config is used if the Out LED is
185
+ # configured as "Out Status", see BrickletIndustrialAnalogOutV2#set_out_led_config.
186
+ #
187
+ # For each channel you can choose between threshold and intensity mode.
188
+ #
189
+ # In threshold mode you can define a positive or a negative threshold.
190
+ # For a positive threshold set the "min" parameter to the threshold value in mV or
191
+ # µA above which the LED should turn on and set the "max" parameter to 0. Example:
192
+ # If you set a positive threshold of 5V, the LED will turn on as soon as the
193
+ # output value exceeds 5V and turn off again if it goes below 5V.
194
+ # For a negative threshold set the "max" parameter to the threshold value in mV or
195
+ # µA below which the LED should turn on and set the "min" parameter to 0. Example:
196
+ # If you set a negative threshold of 5V, the LED will turn on as soon as the
197
+ # output value goes below 5V and the LED will turn off when the output value
198
+ # exceeds 5V.
199
+ #
200
+ # In intensity mode you can define a range mV or µA that is used to scale the brightness
201
+ # of the LED. Example with min=2V, max=8V: The LED is off at 2V and below, on at
202
+ # 8V and above and the brightness is linearly scaled between the values 2V and 8V.
203
+ # If the min value is greater than the max value, the LED brightness is scaled the
204
+ # other way around.
205
+ #
206
+ # By default the channel LED status config is set to intensity with min=0V and
207
+ # max=10V.
208
+ def set_out_led_status_config(min, max, config)
209
+ send_request FUNCTION_SET_OUT_LED_STATUS_CONFIG, [min, max, config], 'S S C', 0, ''
210
+ end
211
+
212
+ # Returns the Out LED status configuration as set by BrickletIndustrialAnalogOutV2#set_out_led_status_config.
213
+ def get_out_led_status_config
214
+ send_request FUNCTION_GET_OUT_LED_STATUS_CONFIG, [], '', 5, 'S S C'
215
+ end
216
+
217
+ # Returns the error count for the communication between Brick and Bricklet.
218
+ #
219
+ # The errors are divided into
220
+ #
221
+ # * ACK checksum errors,
222
+ # * message checksum errors,
223
+ # * framing errors and
224
+ # * overflow errors.
225
+ #
226
+ # The errors counts are for errors that occur on the Bricklet side. All
227
+ # Bricks have a similar function that returns the errors on the Brick side.
228
+ def get_spitfp_error_count
229
+ send_request FUNCTION_GET_SPITFP_ERROR_COUNT, [], '', 16, 'L L L L'
230
+ end
231
+
232
+ # Sets the bootloader mode and returns the status after the requested
233
+ # mode change was instigated.
234
+ #
235
+ # You can change from bootloader mode to firmware mode and vice versa. A change
236
+ # from bootloader mode to firmware mode will only take place if the entry function,
237
+ # device identifier and CRC are present and correct.
238
+ #
239
+ # This function is used by Brick Viewer during flashing. It should not be
240
+ # necessary to call it in a normal user program.
241
+ def set_bootloader_mode(mode)
242
+ send_request FUNCTION_SET_BOOTLOADER_MODE, [mode], 'C', 1, 'C'
243
+ end
244
+
245
+ # Returns the current bootloader mode, see BrickletIndustrialAnalogOutV2#set_bootloader_mode.
246
+ def get_bootloader_mode
247
+ send_request FUNCTION_GET_BOOTLOADER_MODE, [], '', 1, 'C'
248
+ end
249
+
250
+ # Sets the firmware pointer for BrickletIndustrialAnalogOutV2#write_firmware. The pointer has
251
+ # to be increased by chunks of size 64. The data is written to flash
252
+ # every 4 chunks (which equals to one page of size 256).
253
+ #
254
+ # This function is used by Brick Viewer during flashing. It should not be
255
+ # necessary to call it in a normal user program.
256
+ def set_write_firmware_pointer(pointer)
257
+ send_request FUNCTION_SET_WRITE_FIRMWARE_POINTER, [pointer], 'L', 0, ''
258
+ end
259
+
260
+ # Writes 64 Bytes of firmware at the position as written by
261
+ # BrickletIndustrialAnalogOutV2#set_write_firmware_pointer before. The firmware is written
262
+ # to flash every 4 chunks.
263
+ #
264
+ # You can only write firmware in bootloader mode.
265
+ #
266
+ # This function is used by Brick Viewer during flashing. It should not be
267
+ # necessary to call it in a normal user program.
268
+ def write_firmware(data)
269
+ send_request FUNCTION_WRITE_FIRMWARE, [data], 'C64', 1, 'C'
270
+ end
271
+
272
+ # Sets the status LED configuration. By default the LED shows
273
+ # communication traffic between Brick and Bricklet, it flickers once
274
+ # for every 10 received data packets.
275
+ #
276
+ # You can also turn the LED permanently on/off or show a heartbeat.
277
+ #
278
+ # If the Bricklet is in bootloader mode, the LED is will show heartbeat by default.
279
+ def set_status_led_config(config)
280
+ send_request FUNCTION_SET_STATUS_LED_CONFIG, [config], 'C', 0, ''
281
+ end
282
+
283
+ # Returns the configuration as set by BrickletIndustrialAnalogOutV2#set_status_led_config
284
+ def get_status_led_config
285
+ send_request FUNCTION_GET_STATUS_LED_CONFIG, [], '', 1, 'C'
286
+ end
287
+
288
+ # Returns the temperature in °C as measured inside the microcontroller. The
289
+ # value returned is not the ambient temperature!
290
+ #
291
+ # The temperature is only proportional to the real temperature and it has bad
292
+ # accuracy. Practically it is only useful as an indicator for
293
+ # temperature changes.
294
+ def get_chip_temperature
295
+ send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 2, 's'
296
+ end
297
+
298
+ # Calling this function will reset the Bricklet. All configurations
299
+ # will be lost.
300
+ #
301
+ # After a reset you have to create new device objects,
302
+ # calling functions on the existing ones will result in
303
+ # undefined behavior!
304
+ def reset
305
+ send_request FUNCTION_RESET, [], '', 0, ''
306
+ end
307
+
308
+ # Writes a new UID into flash. If you want to set a new UID
309
+ # you have to decode the Base58 encoded UID string into an
310
+ # integer first.
311
+ #
312
+ # We recommend that you use Brick Viewer to change the UID.
313
+ def write_uid(uid)
314
+ send_request FUNCTION_WRITE_UID, [uid], 'L', 0, ''
315
+ end
316
+
317
+ # Returns the current UID as an integer. Encode as
318
+ # Base58 to get the usual string version.
319
+ def read_uid
320
+ send_request FUNCTION_READ_UID, [], '', 4, 'L'
321
+ end
322
+
323
+ # Returns the UID, the UID where the Bricklet is connected to,
324
+ # the position, the hardware and firmware version as well as the
325
+ # device identifier.
326
+ #
327
+ # The position can be 'a', 'b', 'c' or 'd'.
328
+ #
329
+ # The device identifier numbers can be found :ref:`here <device_identifier>`.
330
+ # |device_identifier_constant|
331
+ def get_identity
332
+ send_request FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S'
333
+ end
334
+
335
+ end
336
+ end
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2018-06-08. #
3
+ # This file was automatically generated on 2018-09-28. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.17 #
5
+ # Ruby Bindings Version 2.1.18 #
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 #
@@ -209,7 +209,7 @@ module Tinkerforge
209
209
 
210
210
  # Activates/deactivates the counter of the given channel.
211
211
  #
212
- # true = activate, false = deactivate.
212
+ # true = activate, false = deactivate.
213
213
  #
214
214
  # By default all channels are activated.
215
215
  def set_counter_active(channel, active)
@@ -218,7 +218,7 @@ module Tinkerforge
218
218
 
219
219
  # Activates/deactivates the counter of all four channels.
220
220
  #
221
- # true = activate, false = deactivate.
221
+ # true = activate, false = deactivate.
222
222
  #
223
223
  # By default all channels are activated.
224
224
  def set_all_counter_active(active)
@@ -242,15 +242,15 @@ module Tinkerforge
242
242
  # Sets the counter configuration for the given channel.
243
243
  #
244
244
  # * Count Edge: Counter can count on rising, falling or both edges.
245
- # * Count Direction: Counter can count up or down. You can also use
246
- # another channel as direction input, see
245
+ # * Count Direction: Counter can count up or down. You can also use
246
+ # another channel as direction input, see
247
247
  # `here <https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Counter.html#external-count-direction>`__
248
248
  # for details.
249
249
  # * Duty Cycle Prescaler: Sets a divider for the internal clock. See
250
250
  # `here <https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Counter.html#duty-cycle-prescaler-and-frequency-integration-time>`__
251
251
  # for details.
252
252
  # * Frequency Integration Time: Sets the integration time for the
253
- # frequency measurement. See
253
+ # frequency measurement. See
254
254
  # `here <https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Counter.html#duty-cycle-prescaler-and-frequency-integration-time>`__
255
255
  # for details.
256
256
  def set_counter_configuration(channel, count_edge, count_direction, duty_cycle_prescaler, frequency_integration_time)
@@ -304,7 +304,7 @@ module Tinkerforge
304
304
  send_request FUNCTION_GET_ALL_SIGNAL_DATA_CALLBACK_CONFIGURATION, [], '', 5, 'L ?'
305
305
  end
306
306
 
307
- # Each channel has a corresponding LED. You can turn the LED Off, On or show a
307
+ # Each channel has a corresponding LED. You can turn the LED off, on or show a
308
308
  # heartbeat. You can also set the LED to "Channel Status". In this mode the
309
309
  # LED is on if the channel is high and off otherwise.
310
310
  #
@@ -313,7 +313,7 @@ module Tinkerforge
313
313
  send_request FUNCTION_SET_CHANNEL_LED_CONFIG, [channel, config], 'C C', 0, ''
314
314
  end
315
315
 
316
- # Returns the Channel LED configuration as set by BrickletIndustrialCounter#set_channel_led_config
316
+ # Returns the channel LED configuration as set by BrickletIndustrialCounter#set_channel_led_config
317
317
  def get_channel_led_config(channel)
318
318
  send_request FUNCTION_GET_CHANNEL_LED_CONFIG, [channel], 'C', 1, 'C'
319
319
  end
@@ -322,9 +322,9 @@ module Tinkerforge
322
322
  #
323
323
  # The errors are divided into
324
324
  #
325
- # * ack checksum errors,
325
+ # * ACK checksum errors,
326
326
  # * message checksum errors,
327
- # * frameing errors and
327
+ # * framing errors and
328
328
  # * overflow errors.
329
329
  #
330
330
  # The errors counts are for errors that occur on the Bricklet side. All
@@ -338,7 +338,7 @@ module Tinkerforge
338
338
  #
339
339
  # You can change from bootloader mode to firmware mode and vice versa. A change
340
340
  # from bootloader mode to firmware mode will only take place if the entry function,
341
- # device identifier und crc are present and correct.
341
+ # device identifier and CRC are present and correct.
342
342
  #
343
343
  # This function is used by Brick Viewer during flashing. It should not be
344
344
  # necessary to call it in a normal user program.
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2018-06-08. #
3
+ # This file was automatically generated on 2018-09-28. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.17 #
5
+ # Ruby Bindings Version 2.1.18 #
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 2018-06-08. #
3
+ # This file was automatically generated on 2018-09-28. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.17 #
5
+ # Ruby Bindings Version 2.1.18 #
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 #
@@ -201,7 +201,7 @@ module Tinkerforge
201
201
  send_request FUNCTION_GET_EDGE_COUNT_CONFIGURATION, [channel], 'C', 2, 'C C'
202
202
  end
203
203
 
204
- # Each channel has a corresponding LED. You can turn the LED Off, On or show a
204
+ # Each channel has a corresponding LED. You can turn the LED off, on or show a
205
205
  # heartbeat. You can also set the LED to "Channel Status". In this mode the
206
206
  # LED is on if the channel is high and off otherwise.
207
207
  #
@@ -210,7 +210,7 @@ module Tinkerforge
210
210
  send_request FUNCTION_SET_CHANNEL_LED_CONFIG, [channel, config], 'C C', 0, ''
211
211
  end
212
212
 
213
- # Returns the Channel LED configuration as set by BrickletIndustrialDigitalIn4V2#set_channel_led_config
213
+ # Returns the channel LED configuration as set by BrickletIndustrialDigitalIn4V2#set_channel_led_config
214
214
  def get_channel_led_config(channel)
215
215
  send_request FUNCTION_GET_CHANNEL_LED_CONFIG, [channel], 'C', 1, 'C'
216
216
  end
@@ -219,9 +219,9 @@ module Tinkerforge
219
219
  #
220
220
  # The errors are divided into
221
221
  #
222
- # * ack checksum errors,
222
+ # * ACK checksum errors,
223
223
  # * message checksum errors,
224
- # * frameing errors and
224
+ # * framing errors and
225
225
  # * overflow errors.
226
226
  #
227
227
  # The errors counts are for errors that occur on the Bricklet side. All
@@ -235,7 +235,7 @@ module Tinkerforge
235
235
  #
236
236
  # You can change from bootloader mode to firmware mode and vice versa. A change
237
237
  # from bootloader mode to firmware mode will only take place if the entry function,
238
- # device identifier und crc are present and correct.
238
+ # device identifier and CRC are present and correct.
239
239
  #
240
240
  # This function is used by Brick Viewer during flashing. It should not be
241
241
  # necessary to call it in a normal user program.
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2018-06-08. #
3
+ # This file was automatically generated on 2018-09-28. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.17 #
5
+ # Ruby Bindings Version 2.1.18 #
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 #