arduino_mega 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/arduino_mega.rb +10 -1
  2. metadata +1 -1
data/lib/arduino_mega.rb CHANGED
@@ -14,6 +14,8 @@ require "serialport"
14
14
 
15
15
  class Arduino
16
16
 
17
+ @serial = nil
18
+
17
19
  # initialize port and baudrate
18
20
  def initialize(port, baudrate=115200)
19
21
  puts "initialized"
@@ -160,11 +162,18 @@ class ArduinoMega < Arduino
160
162
  def initialize(args=[])
161
163
  super(*args)
162
164
  output(13) # declare output pins
165
+ if block_given? then
166
+ yield(self)
167
+ close()
168
+ end
163
169
  end
164
170
 
165
171
  def p13h=(bflag)
166
172
  send (bflag == true ? :set_high : :set_low), 13
167
173
  end
168
-
174
+
175
+ def to_s()
176
+ end
177
+
169
178
  end
170
179
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: arduino_mega
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Robertson