View readme.md

Wall·E

Ruby powered robots.

Prerequisites

  1. Download and install the Arduio IDE for your OS
  2. Download and unzip Firmata 2.2
  3. Plug in your Arduino via USB
  4. Open the Arduino IDE, select: File > Open > [Path from step 2] > examples > StandardFirmata
View observable_example.rb
# We only care about Tick and Alarm events.
# The Alarm event should only be handled once.
# All other events should be ignored.
require 'observer'
class Clock
include Observable
def tick
View ruby_arduio_meetup.markdown

Prereq

Arduino

What is Arduino?

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.

View routes.rb
MyApp::Application.routes.draw do
# we only need index and show
resources :posts, :only => [:index, :show]
# we need everything but destroy
resources :widgets, :except => [:destroy]
end
View ninja.rb
class Ninja
def initialize(name, &block)
@name = name
@move = block
end
def attack
@move.call
end
end
View gist:2851226
/Users/hardbap/.rvm/gems/ruby-1.9.2-p290@thumb/gems/activesupport-3.2.5/lib/active_support/core_ext/class/attribute.rb:75:in `accessible_attributes': wrong number of arguments (1 for 0) (ArgumentError)
from /Users/hardbap/.rvm/gems/ruby-1.9.2-p290@thumb/gems/actionpack-3.2.5/lib/action_controller/metal/params_wrapper.rb:171:in `_set_wrapper_defaults'
from /Users/hardbap/.rvm/gems/ruby-1.9.2-p290@thumb/gems/actionpack-3.2.5/lib/action_controller/metal/params_wrapper.rb:133:in `inherited'
from /Users/hardbap/.rvm/gems/ruby-1.9.2-p290@thumb/gems/actionpack-3.2.5/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels) in with'
from /Users/hardbap/.rvm/gems/ruby-1.9.2-p290@thumb/gems/actionpack-3.2.5/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
from /Users/hardbap/code/opinionaided/thumb/app/controllers/pages_controller.rb:1:in `<top (required)>'
from /Users/hardbap/.rvm/gems/ruby-1.9.2-p290@thumb/gems/activesupport-3.2.5/
View gist:2276174
<!--[if IE]>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<![endif]-->
<!--[if !IE]>-->
<script src="/assets/zepto.min.js?body=1" type="text/javascript"></script>
<!--<![endif]-->
View _media-queries.scss
// Dimensions of devices
// iPad Retina - 1536x2048
// iPad - 768x1024
// iPhone - 320x480
// iPhone Retina - 640x960
@mixin mobile-only {
@media only screen and (max-width : 480px) {
@content;
}
View tweet.rake
namespace :tweets do
desc 'Send some tweets to a user'
task :send, [:username] => [:environment] do |t, args|
args.with_defaults(:username => 'cpytel')
Tweet.send(args[:username])
end
end
View Gemfile
group :guard do
gem 'guard', '= 0.8.8' # works with my (old) version of growl
gem 'rb-fsevent', :require => false
gem 'growl_notify', :require => false
gem 'guard-coffeescript'
gem 'guard-sass'
end