Blog Home

Running Arduino on Bespin

dcuartiellesMarch 1st, 2009

Can you imagine Arduino’s IDE running as an online service? Since Mozilla labs just launched the Bespin IDE for Firefox we see that just a little closer. During the monthly Arduino Southern Scandiland meeting #4 that took place today at K3 in Malmo, Olle and Peter went into adding Arduino’s syntax highlighting to Bespin. Just as a proof of concept they posted the following video on vimeo.


Arduino syntax highlighting in Bespin from Olle Jonsson on Vimeo.

If you are interested in trying this out, you will have to install Bespin, get the server to run, and patch the system with this code. As I type Olle is trying to get some inline commands to compile his sketch. Once he has done that, we will be able of compiling Arduino code from Firefox!

Peter brought his Bug from Buglabs.net and we installed both on my Linux machine and on someone’s Mac. I want to see how far that project goes, it is really interesting the way it allows for physical connectivity of different artifacts and how easy it is to reconfigure it. There is a lot to learn from the work made by the developers. A pity I don’t own one myself and Peter had to get it with him.

Our day passed discussing mostly about software and cakes (Dave brought some birthday left overs). We were planning for a better way to push news to the main site, but also to publish information about workshops and community events. We made some planning on how we want to implement adding new boards and libraries to the IDE, how to dinamicaly compile libraries and how to restructure the folders to make updating easier. We see a RSS enhanced future shinning in front of us, but also a lot of Javascript, online documentation, and online project sharing.

Categories:Community

11 Responses to “Running Arduino on Bespin”

  1. Eightlines Says:

    I’ve been playing with Bespin and Wonderfl and agree there’s some pent up potential in both products. Being able to change the syntax highlighting is a nice hack. At first I couldn’t figure out why you’d want to write Arduino code into Bespin seing you wouldn’t be able to compile or upload it to your board. But if it goes in the same direction Wonderfl goes, a social code sharing site where you can fork other people’s code, then it fits the Arduino/Processing mentality precisely.

  2. Olle Jonsson Says:

    OK, say a Python REST method compileFile() – which I just invented, and hackishly added onto the sleek, tight thing that is Bespin – would do whatever magic the Arduino IDE is doing now, on the server that runs Bespin.

    http://gist.github.com/72500 is a version that just logs that it’s reached that method. Enhance that, and suddenly we’re a step closer to that. Adding a toolbar button makes it neater.

    My compile.js command looks like this:

    {
    name: “compile”,
    takes: [“filename”, “project”],
    preview: “compiles your sketch”,
    execute: function(self, args) {
    console.log(self,args,bespin);
    bespin.publish(“bespin:editor:compile”, args);
    }
    }

    It was added using the cmdedit compile invocation, and then activated using cmdload compile.

    The devserver.log file is where you find the log.warn(“output here”) stuff.

  3. Eightlines Creations › Coding with a Fork Says:

    […] the guys over at the Arduino Blog posted this interesting hack enabling Bespin to enable syntax highlighting for Arduino code. Check […]

  4. Olle Jonsson Says:

    And it’s now committed in Bespin: frontend/js/bespin/syntax/arduino.js

  5. Olle Jonsson Says:

    The Bugzilla entry that explains how to turn it on.

  6. Peter Neubauer Says:

    Very nice indeed Olle,
    with REST you probably could have a dedicated compile cloud as a service for users … now you just need the local program upload to the board to work – then the USB driver and a small communication-agent would be the only thing needed to be installed on the developers machine … mmh!

  7. Peter Neubauer Says:

    Have reinstalled my OS X, so at the next Arduino meeting I am promising to have the BUG working!

  8. Bespin progging at The Olle Jonsson Morningstar Says:

    […] and Peter made a Arduino syntax file for Bespin, and then it got added to “tip”. Tip means trunk in Mercurialspeak. Bespin’s […]

  9. tigoe Says:

    I’m not thrilled about cloud coding for Arduino. For that matter, in general. In practice it seems like a good idea, but there are a few situations where it’s a real problem.

    For one, I do a lot of work on the road, and there are many times when you don’t have access to the net — on planes, for example, and surprisingly, in a number of hotels I’ve been in lately in major cities. Also in rural or remote areas. In those times, if I didn’t have the code locally, I’d be screwed. And sure, you can make the argument that everywhere should be networked, but there are a significant number of places that aren’t, and even some that I’m glad that aren’t.

    For another, I feel like putting code in progress up is sometimes like putting up my dirty laundry. I am happy to commit finished versions publicly, but sometimes that takes me days or weeks, and until I’ve done the refactoring and comments to make it readable, I’d just as soon keep it local. And an SVN does that job just fine, no need to code directly to the cloud.

    For a third, there’s always the issue of what your relationship is to the network provider.

    I know none of these are new arguments, but I’ve never seen anyone give adequate solutions to the problem. I’d like to see some, though, because it’s a nice idea in theory, if the practice could be made more effective.

  10. Olle Jonsson Says:

    Connectivity: Offline mode needed, noted. I’ve gotta think a lot more on the practical use-cases. Since we target “new hotness” browsers, there’s a lot of power for it there. And unforeseen problems to solve, of course.

    Bespin’s made to be installable on your own server (think Scandiland Arduino hackers server), re: network provider trust situation.

    Dirty laundry: Would be cool to be able to “open up to a few close friends” but not to the world.

  11. dcuartielles Says:

    Agreed, we will install a demo server to try things out and develop things as long as we can. Interested people be tuned!

Leave a Reply

You must be logged in with your Arduino account to post a comment.