This post is a discussion piece – maybe more of a teaser – on what’s missing to make the LEGO MINDSTORMS EV3 a fully hackable platform, and what I’m planning to do to address that need. While the stock EV3 programming environment is great for most people, academic users, advanced high school students, real-life programmers, and hackers will find it limiting. But you’ll need to wade through some history to understand why I want to spend time and energy on this task.
A long time ago, I attended one of the first MIT Mindfest events because I was able to port the FORTH programming language to the LEGO MINDSTORMS RCX brick – which was unexpected by the designers of the product. It was a decent little platform for 15 years ago – 32K of RAM and an 8 bit processor. The port worked well, but frankly the learning curve of the RPN style FORTH language was intimidating to many users, and therefore not many tried it out.
The next LEGO brick I hacked was the NXT, with a nice 32 bit ARM processor, 256K of FLASH and 64K of RAM! I was able to squeeze the Lua language onto that brick, but it required the user to reload the brick with my custom firmware. Sure, they could get the official LEGO image back at an time, but it was still enough of a hurdle that maybe a couple of hundred people tried out the language.
Fast forward to a few years back and I get an invitation to participate in early prototype evaluations of the new LEGO MINDSTORMS EV3 – and what an awesome piece of hackable goodness it is! 64 M (yes megs) of RAM, a TI AM1808 ARM processor with an MMU, a micro SD port, USB host and client ports, Bluetooth. Oh yes, it also has buttons, a bit mapped LCD display, and 4 each of sensor and motor ports. It runs Linux dammit!
But for old command line guys like me, and for those interested in firmware hacking and serious robot programming the fun stops there.
Let’s face it, I’m not your typical LEGO MINDSTORMS customer. I have not built very many robots except for the PLOTT3R model that’s one of the 12 official alternate models. Learning to program that robot using the supplied programming environment was not the smoothest experience for me.
Don’t get me wrong. It’s perfect for 95% of all the things you’re likely to want to do with your MINDSTORMS kit, and it’s a great way to get kids of all ages thinking about tinkering. But I found that even a simple robot like my PLOTT3R would have been much easier to program using what I’ll call a “real” programming language.
LEGO has done the right thing for a commercial product, and that’s focus on the Windows and Mac computers that most families use, and that most junior and high schools use. That’s just good business.
But what about users that don’t even have a computer? Folks that “get by” with ever more powerful tablets and smartphones. What about Linux users, like me? What is there for us?
After thinking about it for the better part of the summer, and working like crazy for the past couple of weeks, I think I have an answer. But first I need to talk about the kind of users I’m hoping to attract to this LEGO MINDSTORMS EV3 programming environment.
Who’s Missing Out?
There are at least 4 levels of users that I’ve thought about here, and we’ll start with the most hardcore and work our way up to where most of the rest of you fall into place. You can agree or disagree with the characterizations here, the point is that most people never get to the point of being a complete hacker, and they don’t need to.
- Kernel Hackers – These are the guys like me that like to have complete control of their machines, they build tools to help dive into and modify the lowest level hardware and to manage the development process. This is just too scary for 99.5% of the population.
- Computer Programmers – These folks write application code for computers or websites as their primary occupation, they are comfortable following basic command line instructions for things like formatting SD cards, and don’t need to be told which program to run to edit a configuration file. I’m estimating this at about 10% or so of the EV3 target audience, and I’ll include kids that have one parent that’s a programmer here as well.
- Daily Computer Users – These people use computers as part of their job. They will be familiar with spreadsheets, and maybe some media editing. They will probably be OK with a plain text (not word processor) editors, and maybe even have some command line experience. These users will be OK with the official LEGO programming environment but may want to see if they can do some text based programming as well. This is probably 40% of the EV3 target audience.
- Casual Computer Users – These folks use computers for email, browsing, and media consumption. If they’ve got an EV3 they may get frustrated with learning about programming unless they have a great attention span, are really willing to learn about robotics, and have someone to coach them through the rough spots. Actually, the coach is less important now that social media connects even the most far flung enthusiasts in a group. They need precise, step by step instructions for many computer related tasks. This group makes up the remaining 50% of the EV3 users.
What I’ll be unveiling over the next few weeks and months is a system that satisfies the needs that the official LEGO MINDSTORMS programming environment cannot fulfill. These include being able to:
- Program the brick in a variety of languages
- Program the brick from a tablet or other non-supported device
- Solve complex algorithmic problems using commonly available tools
- Upgrade the brick software to have exactly the mix of tools you need
My past efforts, including pbFORTH and pbLua required Level 3 Computer Programmer skills to use, but sometimes needed level 4 Kernel Hacker skills to debug. So it’s no surprise these tools did not get much traction.
What I’ll be releasing allows the Level 2 Daily Computer Users to finally get a handle on real programming tools for robots. They might need some help from a Level 3 friend to set up the microSD card the first time, but after that it’s a piece of cake.
My toolkit will:
- Fit on a microSD card. You’ll be able to plug the microSD card into your EV3 and not have to change the actual firmware in the EV3 brick. This is a big deal.
- Allow you to plug almost ANY wifi dongle on to the EV3 so you can communicate with the brick, and the brick will be able to communicate on your network.
- Allow you program the brick using a command line interface over a standard SSH encrypted stream. So Windows users can use PuTTY, Linux users can just ssh to the brick, Mac users – I have no idea but I’m sure there’s an ssh terminal hiding in those fancy machines somewhere.
With ssh, even Android and – wait for it … Blackberry users will be able to write and edit programs right on the brick! So there’s no need for IDE’s and complicated, buggy, frameworks
When Is It Coming?
Real soon now. Seriously. I have the brick booting the new kernel and running the default root file system. I have plugged in an ASUS N10 wifi dongle and it as recognized and got a DHCP address. I have ssh’ed to my brick over wifi.
I have yet to compile the LEGO modules to control peripherals, but that’s coming up pretty shortly. The goal is to be able to program the brick in ANY language that supports file IO. No need to make all kinds of complex binding libraries to each language. If you can read and write a file, you can read and write a sensor.
Why Am I Doing This?
Simple. I want to demystify computer (and robot) programming. I want to make it possible for people to use any tool or language they are comfortable with to program their robots. I want people to learn (actually re-learn) the terrifying simplicity and power of the Unix way of doing things.
Along the way, you’ll learn a bit about the way I think about writing code, how I mistake-proof processes by scripting them, and how I use the powerful infrastructure built into Linux to automatically manage devices, communicate with remote systems, and deal with version control so we don’t lose things.
If you’re ready to hack in a nice, safe environment where you can’t really wreck anything, and will learn all kinds of new and useful skills, stay tuned.
Share This: by Follow Us: by