pi_wire 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/pi_wire/init.rb +3 -0
- data/lib/pi_wire/version.rb +1 -1
- data/spec/spec_helper.rb +1 -4
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a15da7d47a81214d92643c33b73b05a6a90ff8c5
|
4
|
+
data.tar.gz: 4a1fdb93864525c41721ca6044003f38cc2d0393
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 851ffbcf7929ea3d0d40feac16e82c9c7f9e4bf0dfce10e67a57e965ab33a99dc272dd347072be1fabd8f7ed65785aa7163e1160768f16bd6baf94f20089d6f2
|
7
|
+
data.tar.gz: 04176c0d520a3e3086f0ac820d568a733aaafe496a88969f62938ae0c06128a85804042ad9f806997bb193efb13c5af1a20ea3a984d5f070c1658b204f889327
|
data/README.md
CHANGED
@@ -26,13 +26,13 @@ As with wiringPi you must initialize PiWire before you start using it.
|
|
26
26
|
|
27
27
|
If you don't do this then at best things wont work, and at worst your program will crash.
|
28
28
|
|
29
|
+
You can have PiWire auto initialized by requing `pi_wire/init` instead.
|
30
|
+
|
29
31
|
### LED Blink
|
30
32
|
|
31
33
|
This is effectively the hello world program of electronics:
|
32
34
|
|
33
|
-
require 'pi_wire'
|
34
|
-
|
35
|
-
PiWire.init
|
35
|
+
require 'pi_wire/init'
|
36
36
|
|
37
37
|
pin = PiWire::OutputPin.new(1)
|
38
38
|
|
data/lib/pi_wire/init.rb
ADDED
data/lib/pi_wire/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
|
-
require 'pi_wire'
|
3
|
-
|
4
|
-
# needed to setup the RaspberryPi GPIO hardware.
|
5
|
-
PiWire.init
|
2
|
+
require 'pi_wire/init'
|
6
3
|
|
7
4
|
RSpec.configure do |config|
|
8
5
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pi_wire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Nightingale
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- ext/pi_wire/pi_wire_serial.c
|
92
92
|
- ext/pi_wire/pi_wire_serial.h
|
93
93
|
- lib/pi_wire.rb
|
94
|
+
- lib/pi_wire/init.rb
|
94
95
|
- lib/pi_wire/output_pin.rb
|
95
96
|
- lib/pi_wire/pin.rb
|
96
97
|
- lib/pi_wire/pwm_pin.rb
|