tinkerforge 2.1.8 → 2.1.9

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 (71) hide show
  1. data/lib/tinkerforge/brick_dc.rb +2 -2
  2. data/lib/tinkerforge/brick_imu.rb +2 -2
  3. data/lib/tinkerforge/brick_imu_v2.rb +2 -2
  4. data/lib/tinkerforge/brick_master.rb +410 -20
  5. data/lib/tinkerforge/brick_red.rb +2 -2
  6. data/lib/tinkerforge/brick_servo.rb +2 -2
  7. data/lib/tinkerforge/brick_stepper.rb +2 -2
  8. data/lib/tinkerforge/bricklet_accelerometer.rb +2 -2
  9. data/lib/tinkerforge/bricklet_ambient_light.rb +2 -2
  10. data/lib/tinkerforge/bricklet_ambient_light_v2.rb +2 -2
  11. data/lib/tinkerforge/bricklet_analog_in.rb +2 -2
  12. data/lib/tinkerforge/bricklet_analog_in_v2.rb +2 -2
  13. data/lib/tinkerforge/bricklet_analog_out.rb +2 -2
  14. data/lib/tinkerforge/bricklet_analog_out_v2.rb +2 -2
  15. data/lib/tinkerforge/bricklet_barometer.rb +2 -2
  16. data/lib/tinkerforge/bricklet_can.rb +289 -0
  17. data/lib/tinkerforge/bricklet_co2.rb +2 -2
  18. data/lib/tinkerforge/bricklet_color.rb +2 -2
  19. data/lib/tinkerforge/bricklet_current12.rb +2 -2
  20. data/lib/tinkerforge/bricklet_current25.rb +2 -2
  21. data/lib/tinkerforge/bricklet_distance_ir.rb +2 -2
  22. data/lib/tinkerforge/bricklet_distance_us.rb +2 -2
  23. data/lib/tinkerforge/bricklet_dual_button.rb +2 -2
  24. data/lib/tinkerforge/bricklet_dual_relay.rb +2 -2
  25. data/lib/tinkerforge/bricklet_dust_detector.rb +2 -2
  26. data/lib/tinkerforge/bricklet_gps.rb +2 -2
  27. data/lib/tinkerforge/bricklet_hall_effect.rb +2 -2
  28. data/lib/tinkerforge/bricklet_humidity.rb +2 -2
  29. data/lib/tinkerforge/bricklet_industrial_analog_out.rb +2 -2
  30. data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +2 -2
  31. data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +2 -2
  32. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +2 -2
  33. data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +2 -2
  34. data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +2 -2
  35. data/lib/tinkerforge/bricklet_io16.rb +3 -3
  36. data/lib/tinkerforge/bricklet_io4.rb +2 -2
  37. data/lib/tinkerforge/bricklet_joystick.rb +2 -2
  38. data/lib/tinkerforge/bricklet_laser_range_finder.rb +3 -3
  39. data/lib/tinkerforge/bricklet_lcd_16x2.rb +2 -2
  40. data/lib/tinkerforge/bricklet_lcd_20x4.rb +2 -2
  41. data/lib/tinkerforge/bricklet_led_strip.rb +3 -3
  42. data/lib/tinkerforge/bricklet_line.rb +2 -2
  43. data/lib/tinkerforge/bricklet_linear_poti.rb +2 -2
  44. data/lib/tinkerforge/bricklet_load_cell.rb +2 -2
  45. data/lib/tinkerforge/bricklet_moisture.rb +2 -2
  46. data/lib/tinkerforge/bricklet_motion_detector.rb +2 -2
  47. data/lib/tinkerforge/bricklet_multi_touch.rb +3 -3
  48. data/lib/tinkerforge/bricklet_nfc_rfid.rb +2 -2
  49. data/lib/tinkerforge/bricklet_oled_128x64.rb +2 -2
  50. data/lib/tinkerforge/bricklet_oled_64x48.rb +2 -2
  51. data/lib/tinkerforge/bricklet_piezo_buzzer.rb +2 -2
  52. data/lib/tinkerforge/bricklet_piezo_speaker.rb +2 -2
  53. data/lib/tinkerforge/bricklet_ptc.rb +2 -2
  54. data/lib/tinkerforge/bricklet_real_time_clock.rb +96 -3
  55. data/lib/tinkerforge/bricklet_remote_switch.rb +2 -2
  56. data/lib/tinkerforge/bricklet_rgb_led.rb +59 -0
  57. data/lib/tinkerforge/bricklet_rotary_encoder.rb +2 -2
  58. data/lib/tinkerforge/bricklet_rotary_poti.rb +2 -2
  59. data/lib/tinkerforge/bricklet_rs232.rb +2 -2
  60. data/lib/tinkerforge/bricklet_segment_display_4x7.rb +2 -2
  61. data/lib/tinkerforge/bricklet_solid_state_relay.rb +2 -2
  62. data/lib/tinkerforge/bricklet_sound_intensity.rb +2 -2
  63. data/lib/tinkerforge/bricklet_temperature.rb +2 -2
  64. data/lib/tinkerforge/bricklet_temperature_ir.rb +2 -2
  65. data/lib/tinkerforge/bricklet_thermocouple.rb +2 -2
  66. data/lib/tinkerforge/bricklet_tilt.rb +2 -2
  67. data/lib/tinkerforge/bricklet_uv_light.rb +2 -2
  68. data/lib/tinkerforge/bricklet_voltage.rb +2 -2
  69. data/lib/tinkerforge/bricklet_voltage_current.rb +2 -2
  70. data/lib/tinkerforge/version.rb +1 -1
  71. metadata +4 -2
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 #
@@ -0,0 +1,59 @@
1
+ # -*- ruby encoding: utf-8 -*-
2
+ #############################################################
3
+ # This file was automatically generated on 2016-06-30. #
4
+ # #
5
+ # Ruby Bindings Version 2.1.9 #
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
+ # Controls one RGB LED
14
+ class BrickletRGBLED < Device
15
+ DEVICE_IDENTIFIER = 271 # :nodoc:
16
+ DEVICE_DISPLAY_NAME = 'RGB LED Bricklet' # :nodoc:
17
+
18
+ FUNCTION_SET_RGB_VALUE = 1 # :nodoc:
19
+ FUNCTION_GET_RGB_VALUE = 2 # :nodoc:
20
+ FUNCTION_GET_IDENTITY = 255 # :nodoc:
21
+
22
+
23
+ # Creates an object with the unique device ID <tt>uid</tt> and adds it to
24
+ # the IP Connection <tt>ipcon</tt>.
25
+ def initialize(uid, ipcon)
26
+ super uid, ipcon
27
+
28
+ @api_version = [2, 0, 0]
29
+
30
+ @response_expected[FUNCTION_SET_RGB_VALUE] = RESPONSE_EXPECTED_FALSE
31
+ @response_expected[FUNCTION_GET_RGB_VALUE] = RESPONSE_EXPECTED_ALWAYS_TRUE
32
+ @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
33
+
34
+ end
35
+
36
+ # Sets the *rgb* value for the LED.
37
+ def set_rgb_value(r, g, b)
38
+ send_request(FUNCTION_SET_RGB_VALUE, [r, g, b], 'C C C', 0, '')
39
+ end
40
+
41
+ # Returns the *rgb* value of the LED as set by :func:`SetRGBValues`.
42
+ def get_rgb_value
43
+ send_request(FUNCTION_GET_RGB_VALUE, [], '', 3, 'C C C')
44
+ end
45
+
46
+ # Returns the UID, the UID where the Bricklet is connected to,
47
+ # the position, the hardware and firmware version as well as the
48
+ # device identifier.
49
+ #
50
+ # The position can be 'a', 'b', 'c' or 'd'.
51
+ #
52
+ # The device identifier numbers can be found :ref:`here <device_identifier>`.
53
+ # |device_identifier_constant|
54
+ def get_identity
55
+ send_request(FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S')
56
+ end
57
+
58
+ end
59
+ end
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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 2016-02-10. #
3
+ # This file was automatically generated on 2016-06-30. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.8 #
5
+ # Ruby Bindings Version 2.1.9 #
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,4 +1,4 @@
1
1
 
2
2
  module Tinkerforge
3
- VERSION = '2.1.8'
3
+ VERSION = '2.1.9'
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.8
4
+ version: 2.1.9
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: 2016-02-10 00:00:00.000000000 Z
12
+ date: 2016-06-30 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: matthias@tinkerforge.com
@@ -60,6 +60,7 @@ files:
60
60
  - lib/tinkerforge/bricklet_remote_switch.rb
61
61
  - lib/tinkerforge/bricklet_analog_in_v2.rb
62
62
  - lib/tinkerforge/bricklet_sound_intensity.rb
63
+ - lib/tinkerforge/bricklet_rgb_led.rb
63
64
  - lib/tinkerforge/bricklet_oled_128x64.rb
64
65
  - lib/tinkerforge/bricklet_co2.rb
65
66
  - lib/tinkerforge/brick_servo.rb
@@ -82,6 +83,7 @@ files:
82
83
  - lib/tinkerforge/bricklet_humidity.rb
83
84
  - lib/tinkerforge/bricklet_piezo_buzzer.rb
84
85
  - lib/tinkerforge/bricklet_voltage_current.rb
86
+ - lib/tinkerforge/bricklet_can.rb
85
87
  - lib/tinkerforge/bricklet_voltage.rb
86
88
  - lib/tinkerforge/bricklet_industrial_analog_out.rb
87
89
  - lib/tinkerforge/version.rb