Skip to content
Browse files

Updating gemspec

  • Loading branch information...
1 parent 76b07b0 commit 975725eddc7c65c2f48bbb1e6e7fffa3b389467e @jakebellacera committed Jun 7, 2012
Showing with 48 additions and 2 deletions.
  1. +47 −1 lib/teleduino.rb
  2. +1 −1 teleduino.gemspec
View
48 lib/teleduino.rb
@@ -1,5 +1,51 @@
require 'teleduino/version'
module Teleduino
-
+
+ # 1. Initialize a new teleduino object
+ # 2. Create lookup table with a series of hex codes for each request
+ # 3. ???
+ # 4. Profit!
+
+ def initialize
+ # Begin here...
+
+ @commands = {
+ 'definePinMode' => 20,
+ 'defineSerial' => 40,
+ 'defineServo' => 50,
+ 'defineShiftRegister' => 30,
+ 'defineWire' => 70,
+ 'flushSerial' => 43,
+ 'getAllInputs' => 25,
+ 'getAnalogInput' => 24,
+ 'getDigitalInput' => 23,
+ 'getEeprom' => 62,
+ 'getFreeMemory' => 14,
+ 'getSerial' => 42,
+ 'getServo' => 52,
+ 'getShiftRegister' => 33,
+ 'getUptime' => 16,
+ 'getVersion' => 11,
+ 'getWire' => 72,
+ 'mergeShiftRegister' => 32,
+ 'ping' => 15,
+ 'reset' => 10,
+ 'resetEeprom' => 60,
+ 'setDigitalOutput' => 21,
+ 'setEeprom' => 61,
+ 'setPwmOutput' => 22,
+ 'setSerial' => 41,
+ 'setServo' => 51,
+ 'setShiftRegister' => 31,
+ 'setStatusLed' => 13,
+ 'setStatusLedPin' => 12,
+ 'setWire' => 71
+ }
+ end
+
+ def commands
+ @commands
+ end
+
end
View
2 teleduino.gemspec
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
s.version = JSONBuilder::VERSION
s.summary = 'Ruby interface for controlling Teleduino-enabled Arduino devices.'
s.description = 'Ruby interface for controlling Teleduino-enabled Arduino devices.'
- s.authors = ['Jake Bellacera']
+ s.authors = ['Jake Bellacera', 'Nathan Kennedy']
s.email = ['hi@jakebellacera.com']
s.platform = Gem::Platform::RUBY

0 comments on commit 975725e

Please sign in to comment.
Something went wrong with that request. Please try again.