Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sorts out RSpec, dependencies, and spec Rake tasks
- Loading branch information
1 parent
64fc4e5
commit 350f626
Showing
7 changed files
with
71 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
arduino (0.0.1) | ||
serialport (= 1.0.4) | ||
|
||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
diff-lcs (1.1.2) | ||
rr (1.0.2) | ||
rspec (2.5.0) | ||
rspec-core (~> 2.5.0) | ||
rspec-expectations (~> 2.5.0) | ||
rspec-mocks (~> 2.5.0) | ||
rspec-core (2.5.1) | ||
rspec-expectations (2.5.0) | ||
diff-lcs (~> 1.1.2) | ||
rspec-mocks (2.5.0) | ||
serialport (1.0.4) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
arduino! | ||
rr | ||
rspec (~> 2.5.0) | ||
serialport (= 1.0.4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Arduino ## | ||
This gem makes it simple to connect to an Arduino board using Ruby. | ||
|
||
Arduino is a wonderful little platform that includes a microcontroller, digital I/O, analog input, power, serial communication, and a great community. You can learn more about Arduino at http://arduino.cc. | ||
|
||
## Why connect Arduino to your computer? ## | ||
You can create standalone projects with Arduino using the provided IDE, but for some applications or quick prototypes it is convenient to connect the board to a computer. | ||
|
||
- Control things on your computer with sensors connected to Arduino. | ||
- Use your keyboard to send commands to your Arduino. | ||
- Store data on you computer. Instead of using Arduino's 1KB of flash memory or buying a compatible SD card reader, record data you collect on your giant hard disk. | ||
- Connect your Arduino to the world more easily. Instead of using an ethernet shield and dealing with networking on the Arduino board itself, just write Ruby and use libraries like openuri. | ||
|
||
## Usage ## | ||
require 'arduino' | ||
port = '/dev/tty.usbserial-A7006AkP' # Depending on what port your device is connected to | ||
arduino = Arduino::Board.new(:port => port) | ||
arduino.connect | ||
arduino.send("hello") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
$:.unshift 'lib' | ||
require 'rspec/core/rake_task' | ||
require 'bundler' | ||
Bundler::GemHelper.install_tasks | ||
|
||
desc "Run all specs" | ||
RSpec::Core::RakeTask.new(:spec) | ||
task :default => :spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
module Arduino | ||
end | ||
|
||
require 'arduino/board' | ||
require 'arduino/connector' | ||
require 'arduino/version' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters