rpi 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +2 -1
  3. data.tar.gz.sig +0 -0
  4. data/lib/rpi.rb +13 -8
  5. metadata +3 -3
  6. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f62158b9602f0f043558974975649af84da05aa4
4
- data.tar.gz: fc175f03388e4d6211f3f7ebf1ce59912addbdbf
3
+ metadata.gz: 597785a0c61110765a8937ff9a9cf8330ea38b4e
4
+ data.tar.gz: dae4886c6333e23b45e50239cbbe03dbd35df5e6
5
5
  SHA512:
6
- metadata.gz: 6378a3f523e71e579f0396c24da331825f361c83bf74f2c3d00397a89e21fa2f647358457999f559af38e53d2d76f0f840d124f4042117a022476368e67ca56c
7
- data.tar.gz: 93657657048cd18d0db7034c6a0b8ffc933a37185a1e1e1fb7380073a5960d87256c62b5149dc125633f1199a42452d8420ee4ae0c44e45ffd75b1e7c857e1a6
6
+ metadata.gz: 4cb8f2fb0c5ad7b3d1afe862603bc0b457e719305d88030d94467e34e49aedf95b5a42887cbe8ad8972456df65168055385862ae8a2caa3f8e334cdd856036f4
7
+ data.tar.gz: 941710f9195726daf6918a332b017374de55bcf4ae57a753be22437549fee71f15533d45c81f8c61cbfc204bc15b114fe62692add35a6d0282a25d1ada4e272a
checksums.yaml.gz.sig CHANGED
@@ -1 +1,2 @@
1
- 1�Ȅd@��l�Gx��ҢH�@��]R��Y��%�Z�}�~s�o�]#�3����0�7�O��'����_ՙ�|�&ncH��!��FuQ �6=m�K-y��_@G͙#�s�;4bu� ��%(.-JU���r��8�� bPCK������1�,��+� ^��3���D˞��%��9=_��kUQ!��H���j�
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
- a.each do |pin|
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.1
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-25 00:00:00.000000000 Z
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.6
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