tinderfridge 0.2.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tinderfridge/device.rb +95 -1
- data/lib/tinderfridge/device_collection.rb +69 -0
- data/lib/tinderfridge/device_info.txt +5 -0
- data/lib/tinderfridge/devices/brick_hat/brick_hat.json +11 -0
- data/lib/tinderfridge/devices/brick_hat/brick_hat.rb +18 -0
- data/lib/tinderfridge/devices/brick_hat_zero/brick_hat_zero.json +11 -0
- data/lib/tinderfridge/devices/brick_hat_zero/brick_hat_zero.rb +14 -0
- data/lib/tinderfridge/devices/bricklet_air_quality/bricklet_air_quality.json +10 -0
- data/lib/tinderfridge/devices/bricklet_air_quality/bricklet_air_quality.rb +20 -0
- data/lib/tinderfridge/devices/bricklet_ambient_light_v3/bricklet_ambient_light_v3.json +10 -0
- data/lib/tinderfridge/devices/bricklet_ambient_light_v3/bricklet_ambient_light_v3.rb +19 -0
- data/lib/tinderfridge/devices/bricklet_analog_in_v3/bricklet_analog_in_v3.json +10 -0
- data/lib/tinderfridge/devices/bricklet_analog_out_v3/bricklet_analog_out_v3.json +10 -0
- data/lib/tinderfridge/devices/bricklet_barometer_v2/bricklet_barometer_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_can_v2/bricklet_can_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_co2_v2/bricklet_co2_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_color_v2/bricklet_color_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_color_v2/bricklet_color_v2.rb +31 -0
- data/lib/tinderfridge/devices/bricklet_compass/bricklet_compass.json +10 -0
- data/lib/tinderfridge/devices/bricklet_dc_v2/bricklet_dc_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_distance_us_v2/bricklet_distance_us_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_dmx/bricklet_dmx.json +10 -0
- data/lib/tinderfridge/devices/bricklet_dmx/bricklet_dmx.rb +18 -0
- data/lib/tinderfridge/devices/bricklet_e_paper_296x128/bricklet_e_paper_296x128.json +10 -0
- data/lib/tinderfridge/devices/bricklet_energy_monitor/bricklet_energy_monitor.json +10 -0
- data/lib/tinderfridge/devices/bricklet_gps_v2/bricklet_gps_v2.json +10 -0
- data/lib/tinderfridge/devices/{bricklet_gps_v2.rb → bricklet_gps_v2/bricklet_gps_v2.rb} +0 -0
- data/lib/tinderfridge/devices/bricklet_hall_effect_v2/bricklet_hall_effect_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_humidity_v2/bricklet_humidity_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_imu_v3/bricklet_imu_v3.json +10 -0
- data/lib/tinderfridge/devices/bricklet_industrial_counter/bricklet_industrial_counter.json +11 -0
- data/lib/tinderfridge/devices/bricklet_industrial_digital_in_4_v2/bricklet_industrial_digital_in_4_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_industrial_digital_out_4_v2/bricklet_industrial_digital_out_4_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_industrial_dual_relay/bricklet_industrial_dual_relay.json +10 -0
- data/lib/tinderfridge/devices/bricklet_industrial_dual_relay/bricklet_industrial_dual_relay.rb +20 -0
- data/lib/tinderfridge/devices/bricklet_industrial_ptc/bricklet_industrial_ptc.json +11 -0
- data/lib/tinderfridge/devices/bricklet_industrial_quad_relay_v2/bricklet_industrial_quad_relay_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_isolator/bricklet_isolator.json +10 -0
- data/lib/tinderfridge/devices/bricklet_isolator/bricklet_isolator.rb +17 -0
- data/lib/tinderfridge/devices/bricklet_joystick_v2/bricklet_joystick_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_joystick_v2/bricklet_joystick_v2.rb +15 -0
- data/lib/tinderfridge/devices/bricklet_laser_range_finder_v2/bricklet_laser_range_finder_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_lcd_128x64/bricklet_lcd_128x64.json +10 -0
- data/lib/tinderfridge/devices/{bricklet_lcd_128x64.rb → bricklet_lcd_128x64/bricklet_lcd_128x64.rb} +0 -0
- data/lib/tinderfridge/devices/bricklet_led_strip_v2/bricklet_led_strip_v2.json +10 -0
- data/lib/tinderfridge/devices/{bricklet_led_strip_v2.rb → bricklet_led_strip_v2/bricklet_led_strip_v2.rb} +12 -0
- data/lib/tinderfridge/devices/bricklet_linear_poti_v2/bricklet_linear_poti_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_motion_detector_v2/bricklet_motion_detector_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_motion_detector_v2/bricklet_motion_detector_v2.rb +22 -0
- data/lib/tinderfridge/devices/bricklet_motorized_linear_poti/bricklet_motorized_linear_poti.json +10 -0
- data/lib/tinderfridge/devices/bricklet_motorized_linear_poti/bricklet_motorized_linear_poti.rb +42 -0
- data/lib/tinderfridge/devices/bricklet_multi_touch_v2/bricklet_multi_touch_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_multi_touch_v2/bricklet_multi_touch_v2.rb +16 -0
- data/lib/tinderfridge/devices/bricklet_nfc/bricklet_nfc.json +10 -0
- data/lib/tinderfridge/devices/bricklet_nfc/bricklet_nfc.rb +16 -0
- data/lib/tinderfridge/devices/bricklet_oled_128x64_v2/bricklet_oled_128x64_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_outdoor_weather/bricklet_outdoor_weather.json +10 -0
- data/lib/tinderfridge/devices/{bricklet_outdoor_weather.rb → bricklet_outdoor_weather/bricklet_outdoor_weather.rb} +0 -0
- data/lib/tinderfridge/devices/bricklet_performance_dc/bricklet_performance_dc.json +11 -0
- data/lib/tinderfridge/devices/bricklet_piezo_speaker_v2/bricklet_piezo_speaker_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_real_time_clock_v2/bricklet_real_time_clock_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_remote_switch_v2/bricklet_remote_switch_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_remote_switch_v2/bricklet_remote_switch_v2.rb +15 -0
- data/lib/tinderfridge/devices/bricklet_rgb_led_button/bricklet_rgb_led_button.json +10 -0
- data/lib/tinderfridge/devices/{bricklet_rgb_led_button.rb → bricklet_rgb_led_button/bricklet_rgb_led_button.rb} +9 -0
- data/lib/tinderfridge/devices/bricklet_rgb_led_v2/bricklet_rgb_led_v2.json +10 -0
- data/lib/tinderfridge/devices/{bricklet_rgb_led_v2.rb → bricklet_rgb_led_v2/bricklet_rgb_led_v2.rb} +7 -0
- data/lib/tinderfridge/devices/bricklet_rotary_encoder_v2/bricklet_rotary_encoder_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_rotary_encoder_v2/bricklet_rotary_encoder_v2.rb +20 -0
- data/lib/tinderfridge/devices/bricklet_rotary_poti_v2/bricklet_rotary_poti_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_rs232_v2/bricklet_rs232_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_rs485/bricklet_rs485.json +11 -0
- data/lib/tinderfridge/devices/bricklet_segment_display_4x7_v2/bricklet_segment_display_4x7_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_segment_display_4x7_v2/bricklet_segment_display_4x7_v2.rb +128 -0
- data/lib/tinderfridge/devices/bricklet_servo_v2/bricklet_servo_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_silent_stepper_v2/bricklet_silent_stepper_v2.json +11 -0
- data/lib/tinderfridge/devices/bricklet_sound_pressure_level/bricklet_sound_pressure_level.json +10 -0
- data/lib/tinderfridge/devices/bricklet_temperature_ir_v2/bricklet_temperature_ir_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_temperature_v2/bricklet_temperature_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_thermal_imaging/bricklet_thermal_imaging.json +10 -0
- data/lib/tinderfridge/devices/bricklet_thermocouple_v2/bricklet_thermocouple_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_uv_light_v2/bricklet_uv_light_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_voltage_current_v2/bricklet_voltage_current_v2.json +10 -0
- data/lib/tinderfridge/devices/bricklet_voltage_current_v2/bricklet_voltage_current_v2.rb +18 -0
- data/lib/tinderfridge/devices/bricklet_xmc1400_breakout/bricklet_xmc1400_breakout.json +10 -0
- data/lib/tinderfridge/ip_connection.rb +66 -10
- data/lib/tinderfridge/tinkerforge.rb +3 -0
- data/lib/tinderfridge/version.rb +1 -1
- metadata +98 -17
- data/lib/tinderfridge/devices/bricklet_segment_display_4x7_v2.rb +0 -20
@@ -0,0 +1,18 @@
|
|
1
|
+
module Tinkerforge
|
2
|
+
|
3
|
+
class BrickletVoltageCurrentV2
|
4
|
+
|
5
|
+
# Returns the device's state.
|
6
|
+
def state
|
7
|
+
super.merge(
|
8
|
+
'voltage' => get_voltage,
|
9
|
+
'current' => get_current,
|
10
|
+
'power' => get_power,
|
11
|
+
'configuration' => get_configuration,
|
12
|
+
'calibration' => get_calibration,
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -4,10 +4,10 @@ module Tinkerforge
|
|
4
4
|
|
5
5
|
class IPConnection
|
6
6
|
|
7
|
-
# Returns the host for the IP Connection
|
7
|
+
# Returns the host for the IP Connection.
|
8
8
|
attr_reader :host
|
9
9
|
|
10
|
-
# Returns the port for the IP Connection
|
10
|
+
# Returns the port for the IP Connection.
|
11
11
|
attr_reader :port
|
12
12
|
|
13
13
|
# Returns a programmer-friendly representation of the object.
|
@@ -15,27 +15,80 @@ module Tinkerforge
|
|
15
15
|
"%s (%s:%s)" % [self.class, host, port]
|
16
16
|
end
|
17
17
|
|
18
|
-
# Returns
|
19
|
-
|
20
|
-
|
18
|
+
# Returns the state of the IP Connection.
|
19
|
+
def state
|
20
|
+
{
|
21
|
+
'host' => host,
|
22
|
+
'port' => port,
|
23
|
+
'update_time' => Time.now.gmtime,
|
24
|
+
'connection_state' => get_connection_state,
|
25
|
+
'auto_reconnect' => get_auto_reconnect,
|
26
|
+
'timeout' => get_timeout,
|
27
|
+
'log_path' => log_path,
|
28
|
+
'log_size' => log_size,
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns true if connected to localhost, false if connected via the network.
|
33
|
+
def localhost?
|
34
|
+
@localhost ||= %w(localhost 127.0.0.1 ::1).include? host
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns the path for the Brick Daemon log file. Nil if connected to Brickd via the network.
|
38
|
+
def log_path
|
39
|
+
unless defined? @local_log_path
|
40
|
+
@local_log_path =
|
41
|
+
if localhost?
|
42
|
+
if Gem.win_platform?
|
43
|
+
'C:\ProgramData\Tinkerforge\Brickd\brickd.log'
|
44
|
+
else
|
45
|
+
'/var/log/brickd.log'
|
46
|
+
end
|
47
|
+
else
|
48
|
+
nil
|
49
|
+
end
|
50
|
+
end
|
51
|
+
@local_log_path
|
52
|
+
end
|
53
|
+
|
54
|
+
# Returns the size (in bytes) of the Brick Daemon log file. Nil if connected to Brickd via the network.
|
55
|
+
def log_size
|
56
|
+
if log_path
|
57
|
+
if File.exist? log_path
|
58
|
+
File.size log_path
|
59
|
+
else
|
60
|
+
0
|
61
|
+
end
|
62
|
+
else
|
63
|
+
nil
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Returns a Tinkerforge::DeviceCollection with devices discovered for this IP Connection. Discovery may take a few moments.
|
21
68
|
#
|
22
|
-
#
|
23
|
-
# This variable will be filled with devices as they are found. See examples.
|
69
|
+
# Accepts an optional argument for the number of seconds to wait, otherwise returns immediately.
|
24
70
|
#
|
71
|
+
# A good idea is to store the result in a variable, which will then be filled with devices as they are found.
|
25
72
|
# @example Using Tinkerforge.connect
|
26
73
|
# my_devices = Tinkerforge.connect.discover
|
27
74
|
#
|
75
|
+
# @example Wait 1 second
|
76
|
+
# Tinkerforge.connect.discover(1).ls
|
77
|
+
#
|
28
78
|
# @example Classic
|
29
79
|
# ipcon = Tinkerforge::IPConnection.new
|
30
80
|
# ipcon.connect 'localhost', 4223
|
31
81
|
# my_devices = ipcon.discover
|
32
|
-
def discover
|
82
|
+
def discover(seconds=nil)
|
33
83
|
list = Tinkerforge::DeviceCollection.new
|
84
|
+
|
34
85
|
self.register_callback(CALLBACK_ENUMERATE) do |*args|
|
35
86
|
case args[6]
|
36
87
|
when 0, 1
|
37
88
|
unless list.key?(args[0])
|
38
|
-
|
89
|
+
if dev = device_instance_from_enum_data(args)
|
90
|
+
list[args[0]] = dev
|
91
|
+
end
|
39
92
|
end
|
40
93
|
when 2
|
41
94
|
list.delete args[0]
|
@@ -43,7 +96,9 @@ module Tinkerforge
|
|
43
96
|
raise "Unknown Enumeration Type: #{args[6]}"
|
44
97
|
end
|
45
98
|
end
|
99
|
+
|
46
100
|
self.enumerate
|
101
|
+
sleep(seconds.to_f) if seconds
|
47
102
|
list
|
48
103
|
end
|
49
104
|
|
@@ -55,7 +110,8 @@ module Tinkerforge
|
|
55
110
|
require "tinkerforge/#{dev_info[2][1]}"
|
56
111
|
Tinkerforge.const_get(dev_info[2][0]).new enum_data[0], self
|
57
112
|
else
|
58
|
-
|
113
|
+
warn "Unknown Device Identifier: #{enum_data[5]} (UID: #{enum_data[0]})"
|
114
|
+
nil
|
59
115
|
end
|
60
116
|
end
|
61
117
|
|
@@ -2,6 +2,9 @@ require 'tinkerforge/ip_connection'
|
|
2
2
|
|
3
3
|
module Tinkerforge
|
4
4
|
|
5
|
+
ALL_VERSIONS_URL = 'https://download.tinkerforge.com/all_versions.txt'
|
6
|
+
LATEST_VERSIONS_URL = 'https://download.tinkerforge.com/latest_versions.txt'
|
7
|
+
|
5
8
|
# Returns the directory where Tinkerforge bindings appear to be installed.
|
6
9
|
def self.lib_dir
|
7
10
|
File.dirname File.dirname Device.instance_method('uid').source_location.first
|
data/lib/tinderfridge/version.rb
CHANGED
metadata
CHANGED
@@ -1,31 +1,37 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tinderfridge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lllist.eu
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tinkerforge
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.1'
|
20
|
+
- - ">="
|
18
21
|
- !ruby/object:Gem::Version
|
19
22
|
version: 2.1.27
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.1'
|
30
|
+
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
32
|
version: 2.1.27
|
27
|
-
description:
|
28
|
-
email:
|
33
|
+
description:
|
34
|
+
email:
|
29
35
|
executables: []
|
30
36
|
extensions: []
|
31
37
|
extra_rdoc_files: []
|
@@ -35,13 +41,88 @@ files:
|
|
35
41
|
- lib/tinderfridge/device_collection.rb
|
36
42
|
- lib/tinderfridge/device_info.rb
|
37
43
|
- lib/tinderfridge/device_info.txt
|
38
|
-
- lib/tinderfridge/devices/
|
39
|
-
- lib/tinderfridge/devices/
|
40
|
-
- lib/tinderfridge/devices/
|
41
|
-
- lib/tinderfridge/devices/
|
42
|
-
- lib/tinderfridge/devices/
|
43
|
-
- lib/tinderfridge/devices/
|
44
|
-
- lib/tinderfridge/devices/
|
44
|
+
- lib/tinderfridge/devices/brick_hat/brick_hat.json
|
45
|
+
- lib/tinderfridge/devices/brick_hat/brick_hat.rb
|
46
|
+
- lib/tinderfridge/devices/brick_hat_zero/brick_hat_zero.json
|
47
|
+
- lib/tinderfridge/devices/brick_hat_zero/brick_hat_zero.rb
|
48
|
+
- lib/tinderfridge/devices/bricklet_air_quality/bricklet_air_quality.json
|
49
|
+
- lib/tinderfridge/devices/bricklet_air_quality/bricklet_air_quality.rb
|
50
|
+
- lib/tinderfridge/devices/bricklet_ambient_light_v3/bricklet_ambient_light_v3.json
|
51
|
+
- lib/tinderfridge/devices/bricklet_ambient_light_v3/bricklet_ambient_light_v3.rb
|
52
|
+
- lib/tinderfridge/devices/bricklet_analog_in_v3/bricklet_analog_in_v3.json
|
53
|
+
- lib/tinderfridge/devices/bricklet_analog_out_v3/bricklet_analog_out_v3.json
|
54
|
+
- lib/tinderfridge/devices/bricklet_barometer_v2/bricklet_barometer_v2.json
|
55
|
+
- lib/tinderfridge/devices/bricklet_can_v2/bricklet_can_v2.json
|
56
|
+
- lib/tinderfridge/devices/bricklet_co2_v2/bricklet_co2_v2.json
|
57
|
+
- lib/tinderfridge/devices/bricklet_color_v2/bricklet_color_v2.json
|
58
|
+
- lib/tinderfridge/devices/bricklet_color_v2/bricklet_color_v2.rb
|
59
|
+
- lib/tinderfridge/devices/bricklet_compass/bricklet_compass.json
|
60
|
+
- lib/tinderfridge/devices/bricklet_dc_v2/bricklet_dc_v2.json
|
61
|
+
- lib/tinderfridge/devices/bricklet_distance_us_v2/bricklet_distance_us_v2.json
|
62
|
+
- lib/tinderfridge/devices/bricklet_dmx/bricklet_dmx.json
|
63
|
+
- lib/tinderfridge/devices/bricklet_dmx/bricklet_dmx.rb
|
64
|
+
- lib/tinderfridge/devices/bricklet_e_paper_296x128/bricklet_e_paper_296x128.json
|
65
|
+
- lib/tinderfridge/devices/bricklet_energy_monitor/bricklet_energy_monitor.json
|
66
|
+
- lib/tinderfridge/devices/bricklet_gps_v2/bricklet_gps_v2.json
|
67
|
+
- lib/tinderfridge/devices/bricklet_gps_v2/bricklet_gps_v2.rb
|
68
|
+
- lib/tinderfridge/devices/bricklet_hall_effect_v2/bricklet_hall_effect_v2.json
|
69
|
+
- lib/tinderfridge/devices/bricklet_humidity_v2/bricklet_humidity_v2.json
|
70
|
+
- lib/tinderfridge/devices/bricklet_imu_v3/bricklet_imu_v3.json
|
71
|
+
- lib/tinderfridge/devices/bricklet_industrial_counter/bricklet_industrial_counter.json
|
72
|
+
- lib/tinderfridge/devices/bricklet_industrial_digital_in_4_v2/bricklet_industrial_digital_in_4_v2.json
|
73
|
+
- lib/tinderfridge/devices/bricklet_industrial_digital_out_4_v2/bricklet_industrial_digital_out_4_v2.json
|
74
|
+
- lib/tinderfridge/devices/bricklet_industrial_dual_relay/bricklet_industrial_dual_relay.json
|
75
|
+
- lib/tinderfridge/devices/bricklet_industrial_dual_relay/bricklet_industrial_dual_relay.rb
|
76
|
+
- lib/tinderfridge/devices/bricklet_industrial_ptc/bricklet_industrial_ptc.json
|
77
|
+
- lib/tinderfridge/devices/bricklet_industrial_quad_relay_v2/bricklet_industrial_quad_relay_v2.json
|
78
|
+
- lib/tinderfridge/devices/bricklet_isolator/bricklet_isolator.json
|
79
|
+
- lib/tinderfridge/devices/bricklet_isolator/bricklet_isolator.rb
|
80
|
+
- lib/tinderfridge/devices/bricklet_joystick_v2/bricklet_joystick_v2.json
|
81
|
+
- lib/tinderfridge/devices/bricklet_joystick_v2/bricklet_joystick_v2.rb
|
82
|
+
- lib/tinderfridge/devices/bricklet_laser_range_finder_v2/bricklet_laser_range_finder_v2.json
|
83
|
+
- lib/tinderfridge/devices/bricklet_lcd_128x64/bricklet_lcd_128x64.json
|
84
|
+
- lib/tinderfridge/devices/bricklet_lcd_128x64/bricklet_lcd_128x64.rb
|
85
|
+
- lib/tinderfridge/devices/bricklet_led_strip_v2/bricklet_led_strip_v2.json
|
86
|
+
- lib/tinderfridge/devices/bricklet_led_strip_v2/bricklet_led_strip_v2.rb
|
87
|
+
- lib/tinderfridge/devices/bricklet_linear_poti_v2/bricklet_linear_poti_v2.json
|
88
|
+
- lib/tinderfridge/devices/bricklet_motion_detector_v2/bricklet_motion_detector_v2.json
|
89
|
+
- lib/tinderfridge/devices/bricklet_motion_detector_v2/bricklet_motion_detector_v2.rb
|
90
|
+
- lib/tinderfridge/devices/bricklet_motorized_linear_poti/bricklet_motorized_linear_poti.json
|
91
|
+
- lib/tinderfridge/devices/bricklet_motorized_linear_poti/bricklet_motorized_linear_poti.rb
|
92
|
+
- lib/tinderfridge/devices/bricklet_multi_touch_v2/bricklet_multi_touch_v2.json
|
93
|
+
- lib/tinderfridge/devices/bricklet_multi_touch_v2/bricklet_multi_touch_v2.rb
|
94
|
+
- lib/tinderfridge/devices/bricklet_nfc/bricklet_nfc.json
|
95
|
+
- lib/tinderfridge/devices/bricklet_nfc/bricklet_nfc.rb
|
96
|
+
- lib/tinderfridge/devices/bricklet_oled_128x64_v2/bricklet_oled_128x64_v2.json
|
97
|
+
- lib/tinderfridge/devices/bricklet_outdoor_weather/bricklet_outdoor_weather.json
|
98
|
+
- lib/tinderfridge/devices/bricklet_outdoor_weather/bricklet_outdoor_weather.rb
|
99
|
+
- lib/tinderfridge/devices/bricklet_performance_dc/bricklet_performance_dc.json
|
100
|
+
- lib/tinderfridge/devices/bricklet_piezo_speaker_v2/bricklet_piezo_speaker_v2.json
|
101
|
+
- lib/tinderfridge/devices/bricklet_real_time_clock_v2/bricklet_real_time_clock_v2.json
|
102
|
+
- lib/tinderfridge/devices/bricklet_remote_switch_v2/bricklet_remote_switch_v2.json
|
103
|
+
- lib/tinderfridge/devices/bricklet_remote_switch_v2/bricklet_remote_switch_v2.rb
|
104
|
+
- lib/tinderfridge/devices/bricklet_rgb_led_button/bricklet_rgb_led_button.json
|
105
|
+
- lib/tinderfridge/devices/bricklet_rgb_led_button/bricklet_rgb_led_button.rb
|
106
|
+
- lib/tinderfridge/devices/bricklet_rgb_led_v2/bricklet_rgb_led_v2.json
|
107
|
+
- lib/tinderfridge/devices/bricklet_rgb_led_v2/bricklet_rgb_led_v2.rb
|
108
|
+
- lib/tinderfridge/devices/bricklet_rotary_encoder_v2/bricklet_rotary_encoder_v2.json
|
109
|
+
- lib/tinderfridge/devices/bricklet_rotary_encoder_v2/bricklet_rotary_encoder_v2.rb
|
110
|
+
- lib/tinderfridge/devices/bricklet_rotary_poti_v2/bricklet_rotary_poti_v2.json
|
111
|
+
- lib/tinderfridge/devices/bricklet_rs232_v2/bricklet_rs232_v2.json
|
112
|
+
- lib/tinderfridge/devices/bricklet_rs485/bricklet_rs485.json
|
113
|
+
- lib/tinderfridge/devices/bricklet_segment_display_4x7_v2/bricklet_segment_display_4x7_v2.json
|
114
|
+
- lib/tinderfridge/devices/bricklet_segment_display_4x7_v2/bricklet_segment_display_4x7_v2.rb
|
115
|
+
- lib/tinderfridge/devices/bricklet_servo_v2/bricklet_servo_v2.json
|
116
|
+
- lib/tinderfridge/devices/bricklet_silent_stepper_v2/bricklet_silent_stepper_v2.json
|
117
|
+
- lib/tinderfridge/devices/bricklet_sound_pressure_level/bricklet_sound_pressure_level.json
|
118
|
+
- lib/tinderfridge/devices/bricklet_temperature_ir_v2/bricklet_temperature_ir_v2.json
|
119
|
+
- lib/tinderfridge/devices/bricklet_temperature_v2/bricklet_temperature_v2.json
|
120
|
+
- lib/tinderfridge/devices/bricklet_thermal_imaging/bricklet_thermal_imaging.json
|
121
|
+
- lib/tinderfridge/devices/bricklet_thermocouple_v2/bricklet_thermocouple_v2.json
|
122
|
+
- lib/tinderfridge/devices/bricklet_uv_light_v2/bricklet_uv_light_v2.json
|
123
|
+
- lib/tinderfridge/devices/bricklet_voltage_current_v2/bricklet_voltage_current_v2.json
|
124
|
+
- lib/tinderfridge/devices/bricklet_voltage_current_v2/bricklet_voltage_current_v2.rb
|
125
|
+
- lib/tinderfridge/devices/bricklet_xmc1400_breakout/bricklet_xmc1400_breakout.json
|
45
126
|
- lib/tinderfridge/ip_connection.rb
|
46
127
|
- lib/tinderfridge/tinkerforge.rb
|
47
128
|
- lib/tinderfridge/version.rb
|
@@ -52,7 +133,7 @@ metadata:
|
|
52
133
|
homepage_uri: https://github.com/lllisteu/tinderfridge
|
53
134
|
changelog_uri: https://github.com/lllisteu/tinderfridge/blob/master/History.md
|
54
135
|
documentation_uri: https://www.rubydoc.info/gems/tinderfridge
|
55
|
-
post_install_message:
|
136
|
+
post_install_message:
|
56
137
|
rdoc_options: []
|
57
138
|
require_paths:
|
58
139
|
- lib
|
@@ -67,8 +148,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
148
|
- !ruby/object:Gem::Version
|
68
149
|
version: '0'
|
69
150
|
requirements: []
|
70
|
-
rubygems_version: 3.1.
|
71
|
-
signing_key:
|
151
|
+
rubygems_version: 3.1.4
|
152
|
+
signing_key:
|
72
153
|
specification_version: 4
|
73
154
|
summary: Extending Tinkerforge in fun and useful ways.
|
74
155
|
test_files: []
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module Tinkerforge
|
2
|
-
|
3
|
-
class BrickletSegmentDisplay4x7V2
|
4
|
-
|
5
|
-
# Clears the display.
|
6
|
-
def clear
|
7
|
-
set_segments [false]*8, [false]*8, [false]*8, [false]*8, [false]*2, false
|
8
|
-
true
|
9
|
-
end
|
10
|
-
|
11
|
-
alias blackout clear
|
12
|
-
|
13
|
-
# Returns the state of all 35 segments.
|
14
|
-
def segments
|
15
|
-
send_request FUNCTION_GET_SEGMENTS, [], '', 14, '?35'
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|