Go Down

Topic: Breakfast, serial for Arduino (Read 1 time) previous topic - next topic

Justin Catalana

Oct 30, 2008, 09:23 am Last Edit: Oct 30, 2008, 09:24 am by justin_Catalana Reason: 1
Breakfast is an Arduino firmware offering serial access over the onboard USB to all
of Adruino's functions, along with the ability to construct custom serial commands.
With the sketch 'breakfast_sketch' you will find a library for communicating
with Breakfast written in Ruby. For a proof of concept I have made a fully functional
Arduino Shell implemented using Breakfast and Interactive Ruby (IRB). The shell
allows you to execute most Arduino commands ver batim from the command line.
The shell also supports command recall by pressing the up and down arrows and
tab completion.

To download, and for more information, visit:
http://inhocsignovinces.net/



I am currently making a Processing library for Breakfast.

admin

Are you aware of firmata?

it has been the standard on arduino for almost 2 years now.



Justin Catalana

I did try firmata, but it didn't seem to support any handshaking, and because of that it failed sometimes. Additionally firmata requires you to write a new sketch for each application, Breakfast only uses one sketch which is configured from the computer.

I also think firmata lacks some crucial documentation, at this point to understand the outcome of a command you need to crawl through the header files.

Last, multiple options is a good thing in open source software, don't think of it as redundancy.

eighthave

#3
Nov 03, 2008, 07:10 am Last Edit: Nov 03, 2008, 07:12 am by eighthave Reason: 1
If you use StandardFirmata, then you don't need to write custom sketches/firmwares.  It currently supports digitalRead/digitalWrite, analogRead, analogWrite, and pinMode.  Servo support is in beta and should be included in Arduino 13.

I2C and Matrix support is being worked on.  There is also support for sending and receiving strings in the Library.

salernos

Well I would like to say: Good Job.

I agree that choice in open source is a good thing, and I am sure that this project has allowed you to explore topics that you find valuable. So the choice to share your work with the community is well appreciated.

As a side note, being a fan of Ruby myself, it is nice to see that it played a role in this project! :-)

salernos

zumbi

#5
Nov 05, 2008, 05:10 pm Last Edit: Nov 05, 2008, 05:19 pm by zumbi Reason: 1
Hello,

Testing the code, i am getting
Code: [Select]

$ ruby arduinoShell.rb /dev/ttyUSB2
arduinoShell.rb:7:in `require': no such file to load -- irb (LoadError)
       from arduinoShell.rb:7

I resolved this installing irb software.

Then i get
Code: [Select]

$ ruby arduinoShell.rb /dev/ttyUSB2
./breakfast.rb:6:in `require': no such file to load -- serialport.so (LoadError)
       from ./breakfast.rb:6
       from arduinoShell.rb:9:in `require'
       from arduinoShell.rb:9


I solve this one installing libserialport-ruby

Now, i got the Arduino Shell, i can turn the LED on and off.

Nice job justin catalana and thanks :-)

Justin Catalana

Glad I could help :)

I included a tutorial in that download you got, try playing around with some of the Ruby loops along with the arduino commands.

It allows for live interactive programming.

salernos

Justin:
Have you looked into the RAD project at all.  Given you obviously have experience in Ruby, it may be of interest to you.

For thous who don't know, RAD is a project that allows you to write Ruby code and have it run on the arduino.

I have just started playing around with it and it seems pretty neat.

salernos

Justin Catalana

#8
Nov 05, 2008, 11:28 pm Last Edit: Nov 05, 2008, 11:28 pm by justin_Catalana Reason: 1
Salernos:
I have looked at RAD a little, and I like it. It's greatest short coming is that it has to use RubytoC.

I would like to make a shoes (http://shoooes.net/) GUI for both RAD and my project, I think it would make for a nice application suite.

salernos

That sounds like  a great idea.  I am currently working on a gui front end to my robot-control, in ruby, but I had never heard of Shoes.  Thanks for the link,  I am not to far into the project, and it may give me an excuse to learn shoes.  Do you have experience with it... is it easy to use (easier than gtk2, or tk?)

salernos

atduskgreg

Justing -- Cool project! I'm the author of RAD and I've been thinking about doing a Shoes GUI as well. I've actually started on it a little though there's not much code to speak of yet. I was imagining it as kind of IDE for programming the Arduino, i.e. use the dynamic nature of Ruby to simulate your sketch and give a visual represenation of what it will do when you actually upload it (i.e. by simulating the Arduino).

What were you thinking of having the Breakfast GUI do? I wonder if there's some way we can work together on something like this...

dbunting

if im understanding correctly, breakfast supports handshakes... right?

someone elsewhere had talked about the desire to connect an arduino to an iPhone, but someone pointed out the fact that the iPhone requiers a handshake to connect. Might this be a solution to that problem?

bart

Justin, can't wait to try, will your website come on-line again?

Go Up