simple_raspberrypi 0.2.1 → 0.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b580b790675569a3df188ea3128046722cc76cc3
4
- data.tar.gz: 9bbfae82fb6ad42a4808a1f2ef39e98fad211bd1
3
+ metadata.gz: 1c10213e2e161b65f1ac59ce24aabe0b26e04394
4
+ data.tar.gz: 81c37070b4dad7f9fbb9fed39acba1ecd444b598
5
5
  SHA512:
6
- metadata.gz: 0b6a89234a952ad1b29eab71a95eee57755d98084a0a7c786aba61a818714a8c043cf560af22b64efbeddcda287c5e4ba6d518a3331148e9efb9cb3befaf96e1
7
- data.tar.gz: 022b42ec788ef1cededd86f6293c59b3f383b04c075812b4f02020c0d15b4fe8a87f14d4a60a42ca1b81b253d841569e3cb408e6cbae62022ba2ef4741b5bd83
6
+ metadata.gz: ca1e7b6524bae5fa119803ba840d347d6c74027629ea6c26fa4a968d61df6c08771454fb6cf3c9f5bcebe262fe361a00d76ff1c455788d4500b3842ffb075629
7
+ data.tar.gz: 2dfa0cdc5be7aa82b5dfe82918401d694f8173d644b33f694734be19e9f59f9f05422eb2db856db0548adce13820dee4682c15bcf71da05f427d06baeb0f149f
checksums.yaml.gz.sig CHANGED
Binary file
@@ -90,7 +90,7 @@ class SimpleRaspberryPi
90
90
  end
91
91
 
92
92
  def initialize(x=[])
93
-
93
+
94
94
  RPi::GPIO.set_numbering :bcm
95
95
 
96
96
  a = case x
@@ -101,10 +101,9 @@ class SimpleRaspberryPi
101
101
  when Array
102
102
  x
103
103
  end
104
-
105
- unexport_all a
106
104
 
107
- @pins = a.map {|pin| PinX.new pin }
105
+
106
+ @pins = a.map {|pin| PinX.new pin.to_i }
108
107
 
109
108
  def @pins.[](i)
110
109
 
@@ -121,7 +120,8 @@ class SimpleRaspberryPi
121
120
  # to avoid "Device or resource busy @ fptr_finalize - /sys/class/gpio/export"
122
121
  # we unexport the pins we used
123
122
 
124
- unexport_all a
123
+ #unexport_all a
124
+ RPi::GPIO.reset
125
125
  end
126
126
  end
127
127
 
@@ -155,4 +155,4 @@ if __FILE__ == $0 then
155
155
  # example
156
156
  my_rpi = SimpleRaspberryPi.new %w(17 22 18 4 23 25 27) # <-- each pin connects to an LED
157
157
  my_rpi.pins[ARGV.first.to_i].method(ARGV.last.to_sym).call
158
- end
158
+ end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_raspberrypi
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
metadata.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- ���My4��}s��r��*$-�a������Lp�?ټ���I��K9Wd3C䌋�����T#��o��� ��OfjBsYuM
2
- �8��J�n�xSY�������do߉<����!vr�wfͤ�Z­c�س'������ f�
1
+ ���*~X��B\�q'��;��N9��6z��m��u��ޚ̲(p8;l��n��'��Љ��2��H2�= ���@��mp+��� �æ���濎�&�5t���H}_��@�eJ*�-�Bn4Dޗ�5DS� I|�t�`��#�G�Xx���>Aӹ�,iO�������$�\XUl�4M{&卶fNw>޻����Y
2
+ ��&���y�� B]��k-��1<x���gW,����ĥZ����b'YDsZvwj[