tinkerforge 2.1.8 → 2.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tinkerforge/brick_dc.rb +2 -2
- data/lib/tinkerforge/brick_imu.rb +2 -2
- data/lib/tinkerforge/brick_imu_v2.rb +2 -2
- data/lib/tinkerforge/brick_master.rb +410 -20
- data/lib/tinkerforge/brick_red.rb +2 -2
- data/lib/tinkerforge/brick_servo.rb +2 -2
- data/lib/tinkerforge/brick_stepper.rb +2 -2
- data/lib/tinkerforge/bricklet_accelerometer.rb +2 -2
- data/lib/tinkerforge/bricklet_ambient_light.rb +2 -2
- data/lib/tinkerforge/bricklet_ambient_light_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_analog_in.rb +2 -2
- data/lib/tinkerforge/bricklet_analog_in_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_analog_out.rb +2 -2
- data/lib/tinkerforge/bricklet_analog_out_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_barometer.rb +2 -2
- data/lib/tinkerforge/bricklet_can.rb +289 -0
- data/lib/tinkerforge/bricklet_co2.rb +2 -2
- data/lib/tinkerforge/bricklet_color.rb +2 -2
- data/lib/tinkerforge/bricklet_current12.rb +2 -2
- data/lib/tinkerforge/bricklet_current25.rb +2 -2
- data/lib/tinkerforge/bricklet_distance_ir.rb +2 -2
- data/lib/tinkerforge/bricklet_distance_us.rb +2 -2
- data/lib/tinkerforge/bricklet_dual_button.rb +2 -2
- data/lib/tinkerforge/bricklet_dual_relay.rb +2 -2
- data/lib/tinkerforge/bricklet_dust_detector.rb +2 -2
- data/lib/tinkerforge/bricklet_gps.rb +2 -2
- data/lib/tinkerforge/bricklet_hall_effect.rb +2 -2
- data/lib/tinkerforge/bricklet_humidity.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_analog_out.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +2 -2
- data/lib/tinkerforge/bricklet_io16.rb +3 -3
- data/lib/tinkerforge/bricklet_io4.rb +2 -2
- data/lib/tinkerforge/bricklet_joystick.rb +2 -2
- data/lib/tinkerforge/bricklet_laser_range_finder.rb +3 -3
- data/lib/tinkerforge/bricklet_lcd_16x2.rb +2 -2
- data/lib/tinkerforge/bricklet_lcd_20x4.rb +2 -2
- data/lib/tinkerforge/bricklet_led_strip.rb +3 -3
- data/lib/tinkerforge/bricklet_line.rb +2 -2
- data/lib/tinkerforge/bricklet_linear_poti.rb +2 -2
- data/lib/tinkerforge/bricklet_load_cell.rb +2 -2
- data/lib/tinkerforge/bricklet_moisture.rb +2 -2
- data/lib/tinkerforge/bricklet_motion_detector.rb +2 -2
- data/lib/tinkerforge/bricklet_multi_touch.rb +3 -3
- data/lib/tinkerforge/bricklet_nfc_rfid.rb +2 -2
- data/lib/tinkerforge/bricklet_oled_128x64.rb +2 -2
- data/lib/tinkerforge/bricklet_oled_64x48.rb +2 -2
- data/lib/tinkerforge/bricklet_piezo_buzzer.rb +2 -2
- data/lib/tinkerforge/bricklet_piezo_speaker.rb +2 -2
- data/lib/tinkerforge/bricklet_ptc.rb +2 -2
- data/lib/tinkerforge/bricklet_real_time_clock.rb +96 -3
- data/lib/tinkerforge/bricklet_remote_switch.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led.rb +59 -0
- data/lib/tinkerforge/bricklet_rotary_encoder.rb +2 -2
- data/lib/tinkerforge/bricklet_rotary_poti.rb +2 -2
- data/lib/tinkerforge/bricklet_rs232.rb +2 -2
- data/lib/tinkerforge/bricklet_segment_display_4x7.rb +2 -2
- data/lib/tinkerforge/bricklet_solid_state_relay.rb +2 -2
- data/lib/tinkerforge/bricklet_sound_intensity.rb +2 -2
- data/lib/tinkerforge/bricklet_temperature.rb +2 -2
- data/lib/tinkerforge/bricklet_temperature_ir.rb +2 -2
- data/lib/tinkerforge/bricklet_thermocouple.rb +2 -2
- data/lib/tinkerforge/bricklet_tilt.rb +2 -2
- data/lib/tinkerforge/bricklet_uv_light.rb +2 -2
- data/lib/tinkerforge/bricklet_voltage.rb +2 -2
- data/lib/tinkerforge/bricklet_voltage_current.rb +2 -2
- data/lib/tinkerforge/version.rb +1 -1
- metadata +4 -2
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2016-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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-
|
3
|
+
# This file was automatically generated on 2016-06-30. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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 #
|
data/lib/tinkerforge/version.rb
CHANGED
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
|
+
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-
|
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
|