I’m happy to announce the release of Electron 0.3. While there are a few under the hood improvements, the big news is a brand new user interface. We’ve rewritten the UI from scratch using Angular JS. This will make Electron more stable and easier to improve in the future.

New UI features:

  • a proper file browser on the left, with collapsing folders
  • collapsing resizable panels.
  • New dialogs to search for boards and libraries
  • new fonts (Source Sans Pro, Source Serif Pro, and Source Code Pro)
  • proper multiple tabs for editing source files

Boards and Libs

The data repo has added support for

  • Adafruit Trinket & Gemma,
  • Flora,
  • timer libs
  • Arduino Yun
  • Esplora
  • DigiSpark Tiny / Pro (buggy)
  • Fio

Broken Stuff

A few things that worked before are now broken, so be aware:

  • serial console (filled with mockup text)
  • docs viewer (filled with mockup text)
  • '+'/'-' buttons for creating/deleting sketches

Thanks to contributors:

  • Alan Holding
  • Nick Oliver
  • Walter Lapchynski

The next release (in a few weeks, hopefully) will focus only on bug fixes and app-izing Electron to have only a single download (no git required).

We need your help testing for the next release. Please file your kudos, bugs, and requests here.

Thanks, Josh

TinkerCad is a free web based CAD program. It runs entirely in the browser using WebGL, so you’ll probably want to use it with Chrome (I think Safari may work in Yosemite+). TinkerCad is meant for novice CAD users. So novice that you can know absolutely nothing about CAD and be able to make something after five minutes of their built in learning quests (tutorials). Then you an save your creation to their cloud or download it for 3D printing.

TinkerCad isn’t full featured. You can’t add chamfered edges for example, but you can combine shapes with CSG operations, stretch and rotate them, and add useful prefab shapes like letters and stars. There is even a scripting language for building programmatic objects. The UI challenge of building a CAD for newbies is daunting, yet somehow they did it. TinkerCad almost went out of business since it turns out novice users are also unlikely to pay for CAD applications. Fortunately AutoDesk bought them and have made TinkerCad their free entry level offering.

But this is a book review, right? 3D Modeling and Printing with TinkerCad is a new book by James Floyd Kelly. it walks you through the basics of navigation, creating shapes, merging and subtracting them, all the way to printing models and importing them into Minecraft. The book is very well written and easy to follow with lots of pictures.

So should you buy it? That depends. TinkerCad’s own interactive tutorials are quite good. While I enjoyed the book I’d say 75% of it covers the same things you’ll learn in the tutorials. It really comes down to whether you are more comfortable learning on screen or by reading a paper book. If you learn by paper, then buy it.

3D Modeling and Printing with Tinkercad: Create and Print Your Own 3D Models, James Floyd Kelly

Now that OSCON is over I can get back to working on Electron. That means a new version is coming, and by far the biggest change will be a brand new user interface. I had posted an early preview here but that's now completely out of date. You see, I discovered a new framework.

Currently Electron is built from two main components. The backend end is NodeJS code. This is the part that actually compiles and uploads your Arduino code. The front end is HTML and JavaScript. This is the part you actually interact with: editor, debugging, clicking the compile button, choosing boards, etc. Currently the UI is written in plain HTML with Bootstrap and JQuery. Sadly, this form of development won't scale. JQuery is great for manipulating a few DOM objects but it just doesn't scale up to a full app. I had considered a few UI frameworks like JQuery UI but several people at OSCON mentioned Angular JS. When I got home I bought a book from O'Reilly and built a few prototypes. I'm so glad that I did.

Angular isn't a set of widgets. It's a JavaScript modules framework with data binding. With Angular I can break Electron up into proper reusable, testable components. It also handles much of the data update boilerplate I previously wrote by hand.

After two days I've completely rewritten the UI in Angular. Almost everything that worked before works in the new UI. The switch over went smoothly thanks to the backend being done entirely with REST requests. I can actually run both the old and new UIs at the same time.

Here is a screenshot of what the new version looks like.

preview

Some time next week I should have v0.3 released. After that the focus will be entirely on integrating Atom-Shell so that you don't need the command line at all. You'll be able to just download a proper app binary like any other desktop program.

Oh yeah, and we had a BOF at OSCON on Electron. I got lots of good feedback that will work it's way into the first post 1.0 release.

And one more thing...

If you live here in Eugene I'll be doing an Electron presentation at this week's Eugene Linux User's Group .

Michio Kaku, the science popularizer and theoretical physicist, is always a wonderful speaker. I’ve greatly enjoyed his TED talks. In Physics of the Impossible he takes on the many improbable technologies of science fiction to determine if they are in fact impossible. Surprisingly, few truly are. He divides technologies into three levels of impossible: likely today or in the next 20 years with existing science (ex: replicators), likely in the next hundred or so without violating any known laws of physics (shockingly, time travel is in this bunch), and the truly impossible without some new laws of physics. There are very few things in the last category. It’s an easy read and lots of fun.

Should you read it? Yes!

Physics of the Impossible: A Scientific Exploration into the World of Phasers, Force Fields, Teleportation, and Time Travel, by Michio Kaku

Dr. Kaku on the Daily Show

This is day zero of my Month Of Writing

Controlling an Arduino project over a serial connection is one of the most common tasks you might want to do, and yet it's surprisingly hard to find a good library. I really don't like the official ones because they are limited and require too much setup. After much googling with Bing I found one called CmdArduino by Akiba at Freaklabs.

CmdArduino does exactly what I want, minus a few tweaks. I emailed Akiba about it. Even though he had never done an update to the library in three years he responded right away. I asked if I could take over the lib and he said yes! So I'm now the official maintainer for CmdArduino. For my first release I've added Stream support so it will work with more than just the regular Serial port; very important for working with alternative streams like Bluetooth LE modules.

CmdArduino is super easy to use. Create your command functions with a signature like:

void left(int arg_cnt, char **args)

Then register it like this:

cmdInit(&MyStream);
cmdAdd('left',left);

Now the left function will be called whenever you type 'left' into the other end of the stream. If you add arguments after the command they will show up in the args array. At OSCON I build a robot controlled by a chat app on my phone over BLE. When I typed in spin 3000 the robot's spin function would be called with the value 3000 for the duration. The code looks like this:

void spin(int arg_cnt, char **args) {
    int time = 1000;
    if(arg_cnt > 0) {
        time = parseInt(args[0]);
    }
    LeftMotor->run(BACKWARD);
    RightMotor->run(FORWARD);
    delay(time);
    RightMotor->run(RELEASE);
    LeftMotor->run(RELEASE);
}

void setup() {
    Serial.begin(9600);
    cmdInit(&ble);
    cmdAdd('spin',spin);
}

It's that easy. The code is up in my github repo now.

https://github.com/joshmarinacci/CmdArduino

Thanks Akiba!