Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Implemented return value for stop and sense functions in sinatras' Ar…
Browse files Browse the repository at this point in the history
…duino API
  • Loading branch information
jmelis committed Mar 26, 2011
1 parent 328cc3a commit 7fada3f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions fermat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,20 @@
when "start"
arduino.start
when "stop"
arduino.stop
#TBD: return value
steps = arduino.stop
steps.to_s
when "forward"
arduino.forward
when "backward"
arduino.backward
when "toggle"
arduino.toggle
when "sense"
arduino.sense
#TBD: return value
sense = arduino.sense?
if sense
"FORWARD"
else
"BACKWARD"
end
end
end

0 comments on commit 7fada3f

Please sign in to comment.