-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GPIO gem and embed iframe for webcam.
- Loading branch information
pivotal
committed
Feb 25, 2013
1 parent
ffbc537
commit e9abdc0
Showing
5 changed files
with
17 additions
and
2 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 |
---|---|---|
|
@@ -2,6 +2,7 @@ source :rubygems | |
|
||
gem 'sinatra' | ||
gem 'haml' | ||
gem 'gpio' | ||
|
||
group :test do | ||
gem 'rspec' | ||
|
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,5 +1,11 @@ | ||
require 'sinatra' | ||
require 'gpio' | ||
|
||
#TODO: parse webcam url from config.yml | ||
get '/' do | ||
|
||
haml :index | ||
end | ||
|
||
get '/buzz' do | ||
GPIO::Pin.new(pin: 22) | ||
end |
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,7 @@ | ||
%h1 | ||
Pivotal Door buzzer | ||
|
||
%iframe{:src => locals.webcam_url, :style => "width: 100%; height:700px;" } | ||
|
||
%a{:href => '/buzz'} | ||
Buzz Me in! |
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 |
---|---|---|
|
@@ -2,6 +2,5 @@ | |
|
||
describe 'The most awesomest door buzzing app EVAAARRRRR' do | ||
it 'should buzz me in' do | ||
|
||
end | ||
end |