Skip to content

Commit db50452

Browse files
committed
Merge pull request #5 from unsymbol/master
Arduino reset fix. Thanks to @unsymbol
2 parents b8a4788 + 4edbcbd commit db50452

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/arduino.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ def turnOff
119119

120120
# close serial connection to connected board
121121
def close
122+
# stops executing arduino code
122123
@serial.write '5'.chr
124+
# resets the arduino board (not on windows)
125+
@serial.dtr=(0)
126+
# close serial connection
123127
@serial.close
124128
p "closed"
125129
end

0 commit comments

Comments
 (0)