rpi 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -1
- data.tar.gz.sig +0 -0
- data/lib/rpi.rb +13 -8
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 597785a0c61110765a8937ff9a9cf8330ea38b4e
|
4
|
+
data.tar.gz: dae4886c6333e23b45e50239cbbe03dbd35df5e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cb8f2fb0c5ad7b3d1afe862603bc0b457e719305d88030d94467e34e49aedf95b5a42887cbe8ad8972456df65168055385862ae8a2caa3f8e334cdd856036f4
|
7
|
+
data.tar.gz: 941710f9195726daf6918a332b017374de55bcf4ae57a753be22437549fee71f15533d45c81f8c61cbfc204bc15b114fe62692add35a6d0282a25d1ada4e272a
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
�vu�4E*g���>[
|
2
|
+
`��ip`TC?ҏ��
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rpi.rb
CHANGED
@@ -89,17 +89,22 @@ class RPi
|
|
89
89
|
# to avoid "Device or resource busy @ fptr_finalize - /sys/class/gpio/export"
|
90
90
|
# we unexport the pins we used
|
91
91
|
|
92
|
-
|
93
|
-
|
94
|
-
uexp = open("/sys/class/gpio/unexport", "w")
|
95
|
-
uexp.write(pin)
|
96
|
-
uexp.close
|
97
|
-
end
|
98
|
-
|
92
|
+
unexport_all
|
99
93
|
end
|
100
94
|
end
|
101
95
|
|
102
96
|
def led() @leds end
|
97
|
+
|
98
|
+
def unexport_all()
|
99
|
+
|
100
|
+
@leds.each do |pin|
|
101
|
+
|
102
|
+
uexp = open("/sys/class/gpio/unexport", "w")
|
103
|
+
uexp.write(pin)
|
104
|
+
uexp.close
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
103
108
|
|
104
109
|
def self.unexport(a)
|
105
110
|
a.each do |pin|
|
@@ -117,4 +122,4 @@ if __FILE__ == $0 then
|
|
117
122
|
# example
|
118
123
|
my_rpi = RPi.new %w(17 22 18 4 23 25 27) # <-- each pin connects to an LED
|
119
124
|
my_rpi.led[ARGV.first.to_i].method(ARGV.last.to_sym).call
|
120
|
-
end
|
125
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rpi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
Wx7qSZTfBXcuGk2ymZ2BpCgaIse2YK04JVIWsaTEFsbO44uMfK+sRtGmTmyf/12f
|
32
32
|
KzQM/zlgQa5pBA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-06
|
34
|
+
date: 2015-08-06 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: pi_piper
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.4.
|
83
|
+
rubygems_version: 2.4.8
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: The RPi gem makes it easy to set blinking LEDs on the Raspberry Pi
|
metadata.gz.sig
CHANGED
Binary file
|