Ruby Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesRuby Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 23rd, 2009, 07:28 AM
needle needle is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2009
Posts: 3 needle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 48 m 8 sec
Reputation Power: 0
Question Modify ruby arduino shell

Hello,

I hope you people can help me out with this one. For a week or so i am trying to modify a ruby script written by Justin. The biggest problem is I don't have any experience programming ruby so I asked for his help and although he offered to help me he is to busy with other things so i thought to ask my question here...

what the script does:
It gives me a shell to communicate to the Arduino through a usb2serial connection.

what i want to change:
when i run the program i give the script one argument, this argument is the location of my serial port, in my case this is:

ruby arduinoshell.rb /dev/tty.usbserial-A6008i1S

but instead of a shell, i want to use more parameters/arguments like this:

ruby arduinoshell.rb /dev/tty.usbserial-A6008i1S "pinMode(13, OUTPUT)" "digitalWrite(13,HIGH)"

any help would be appreciated!

more info about the script and the download link can be found here:

inhocsignovinces dot net

and then look for: Breakfast, serial for Arduino

I assume i have to remove the IRB thingy and replace it with something...

Until now i only came up with this:

PHP Code:
 puts ARGV.size

ARGV
.each do |a|
  
puts "Argument: #{a}"
end 

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesRuby Programming > Modify ruby arduino shell

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap