I’ve had a raspberry pi gathering dust for a few years, but I had an inkling to do something cool with it. Over the holidays, I was gifted a PiStorms kit. PiStorms is a “shield” for the raspberry pi that fits directly onto a set of pins and interfaces with Lego Mindstorms motors and sensors.

Mindstorms is a pretty cool concept, but the entire set runs $350 and doesn’t actually allow full programmatic control over the resulting creation. It’s more of a drag and drop visual programming language.

I was able to download the OS image and flash it to my raspberry pi SD card. However, the PiStorms shield requires direct power, instead of utilizing the DC Power from the raspberry pi. This required a 6 AA battery pack and a set of brand new batteries.

Once the brain was operational, I still needed to build the vehicle. Mindstorms is supposedly compatible with all of the Lego Technic sets and parts, so I bought a basic four-wheeled mechanical car for 50 bucks from the lego store. I chose this model since it appeared to have a surplus of parts and lots of exposed anchor points for modification.

After following the directions for an evening, the car was assembled (aside from the cosmetic touches like stickers, etc). There were gears and axles propelling the rear wheel, and turning the front two. I was able to modify the frame to mount two medium mindstorms motors.

Lastly, I configured a mount for the entire PiStorms / raspberry pi assembly, which is relatively heavy. Once the OS boots up and the wireless connects, PiStorms has a php frontend website to display info allow control of the motors. You can connect to the site over wireless and remotely control the motors, driving and turning the car.

Some of the challenges:


Once the Pi is wired up to batteries, it absolutely drains them. 6 AA batteries in series have about 9v. When PiStorms is turned on, you can see the voltage visibly decrease – 8.8…8.7…8.6. The motors and pi will cease to function once it drops to ~ 6.5V, so there’s very limited juice in the thing. I’m considering upgrading to use a rechargeable RC battery kit, which should extend the lifetime. But for remote robots, battery power is a real issue.

Mechanical Engineering

Perhaps one of the most fascinating challenges was engineering the mount points for the motors and the PiStorms brain. The axles themselves jutted from the frame at certain angles, forcing the orientation of the motors. The motors needed enough anchors in order by maintain torque and accessibility. The PiStorms assembly had to be elevated enough from the frame to ensure smooth turning. Problem solving the mechanical and structural issues was fascinating because it was so constrained. I only had limited parts and spatial real-estate, and the solution space was three dimensions. Choosing Lego as the base tech for building the robot was absolutely essential here. It would be much more difficult to experiment with models and configurations if the parts were permanently affixed metal.

Software Control

The robot as it stands now is hardly better than a cheap RC car. It’s able to drive forward and backward and turn the wheels remotely. The feedback loop is somewhat sluggish (manipulating a javascript-based joystick, sending http posts of the web), and the tuning of the motors is rough (often it will oversteer, over-torquing the steering column). So, there’s much room for improvement needed in the software.

One crux is that robotic motors and sensors are continuous, but the simplistic software API is discrete: The PiStorms unit works by sending a signal to the motors (run for 1 second, spin at 25 rpm, slow down to a stop in .1 seconds, etc). Driving requires iterative polling of the input (every x seconds, check the throttle, translate that to a motor command, send to the motor). Of course, motors in real cars don’t work this way – there’s a smooth continuous feedback between the throttle and the power given to the drive train. The question – how can this be represented in software?

I’d like to add in visual sensors and have the PiBot drive itself using some rudimentary computer vision algorithms. A similar issue arises – how often do you poll the sensor? 100 times a second? 500? Is it possible to act (ex: turn to avoid an obstacle) upon a single view, or is a continuous model of required? What kind of data structures and overall program architecture allow this orchestration between input sensors and output motors? These are some of the interesting questions that arise in robotics.

It’s been a fun project to complete the base model, but the truly fascinating road is the one that lies ahead.

Start it up: MOOCs and Higher Education

Over the summer, I took the Coursera Startup Engineering course. I have some interest in startups, and wanted to get some exposure to all the web tech that has grown popular in the last few years.

Overall I was pretty disappointed.

For the most part, the class was basically a very basic intro on using some popular “cloud computing” technologies: Amazon Web Services, node.js, heroku, github, etc. The final project was very simple, essentially a press release with a donation button attached. There was very little backend coding or logic.

And aside from a brief overview of the startup atmosphere, and maybe some napkin-calculation on revenue potential, there was very little business information communicated.

If I did have a legit idea, how would I meet up with venture capitalists? How would I manage capital? What are some strategies to survive the lean years? Legal requirements? Tax stuff? should I focus on perfecting the tech or getting to market with something messy? What’s a good makeup of the team (coders, graphic designers, PR, business, sales?) None of this was addressed.


From a tech perspective, the course was a nice excuse to get my feet wet with some new technologies. From my limited perspective, the stuff isn’t really anywhere as robust or usable as the tried and true technologies (php + mysql + apache, running your own servers, java / .net).

But beyond the whole startup / silicon valley hype, the entire concept of MOOCs felt weak. This was supposed to be a gold star of Coursera, one of the premiere courses offered, and probably one of the most popular. What we basically got was some 1-day tutorials on setting up AWS, downloading git repositories, configuring and running a node.js webserver. The lectures consisted of the prof reading through the tutorial slides, hardly better than a dozen posts on youtube. There were 7 homework assignments, most of which could be answered by reading through the homework. The most logically challenging programming assignment was implementing a recursive Fibonacci function.

Even classes I skipped or slept through in college offered me more than this.

The ironic thing about the idea behind MOOCs is that they drastically change the format of higher education for the better. But unfortunately, the format they’ve taken so far is to simply record boring lectures of famous profs, and tack on some multiple choice questions at the end of the video.

I can see how distributed tech classes could possibly work – something like Khan Academy, where programming assignments work dynamically in the browser, and you get feedback in small increments to verify you are mastering the brain-intensive techniques and concepts in real-time, instead of waiting for weeks to pass/flunk a test.

But something that is more creative thinking (humanities classes, more senior-level design and programming classes) fall short in the lecture + multiple choice model. Real colleges don’t work this way. The real learning happens in a round table discussion or a project + presentation model.

The problem is those don’t scale easily.

You probably could have some sort of class format, say for a discussion of English literature, where you read the book, then get broken into assigned groups to discuss via web chat. But how can you charge for something that’s hardly more than a volunteer book club? Discussion classes work in real meat-space universities because a professor (or TA) can sit in the discussion, moderate, and give participation points. And at the end, slog through a dozen 10 page papers. That can’t scale.

The project model could work a little bit better. This is sort of what the startup MOOC attempted, even if their framework and automated testing code was a bit too rudimentary. Using some form of automated testing + peer review to verify the project meets the basic requirements, then add in an additional voting/ranking system for extra credit.

The MOOC debate brings into focus the entire question of higher education, however. Once people can read, write, perform basic arithmetic, what else do they need? Is higher ed only for training the professional elite (doctors, lawyers, engineers, biz execs?) Or is there something implicitly *good* in learning? Learning for learning’s sake.

And if so, what role, or *benefit* do MOOCs provide?

When I think about my own experience with learning, most of the hard work was done on my own time, in my own head. Whether that was reading a book, or mastering a new programming paradigm. But classes provided the framework of instruction and curiosity. I used the startup MOOC as a springboard, and an excuse, to evaluate AWS, node.js, git, heroku. The classes presented the syntax in a nicely digestible format, but the hard thinking and brainwork had to be done on my own end, in my own experiments. The homework didn’t catalyze that, I had to take an extra step, set my own goal for what I wanted to get out of it.

So I’m highly skeptical if (the current crop of) MOOCs will ever take off and make any progress in unseating classic meatspace university education. The technical challenges (low-fi videos + message boards + dumbed down assignments) and be improved upon, but I just don’t see how the quality aspects of university learning environment can be scaled digitally.

WebApp Review

Google has come out with yet another attempt to conquer the mighty Facebook, this time with Google+.

Clearly splitting up groups of friends is a good idea, something Facebook has yet to get quite right.

The signup is a bit too complicated – I don’t see people’s moms signing up here anytime soon. Maybe that is a good thing, but it will be tough to conquer Zuck’s 700+ million user behemoth without those demographics.

Since the user count is still low, you run into the current annoyance with facebook – too many posts from certain obnoxious “verbose” users, and not enough updates from the folks you’d rather hear from. circles could potentially solve this, by corralling these folks into their own “chatty / spammy” sphere.

Also interesting is the ability to follow anyone (ala Twitter), instead of a mutual bi-directional friendship (ala Facebook). This means I can subscribe to the posts of folks who may be putting out interesting content, but aren’t actually a RL friend (which is the current use of twitter).

The photo integration is definitely superior to Facebook, but we’ll see if the rest of the API (integration with external apps / services, comment posting, etc) follows suit. That’s what makes Facebook currently so powerful.

The newest streaming music service has finally landed in the U.S.

The client itself is pretty nice. Very similar to iTunes, but sleeker. I’ve had a few crashes, and even had to do a fresh reinstall when some user file got corrupted.

But it is fast to load, and lets you play locally stored music from the iTunes library, as well as the online library. The streaming itself has been fantastic – never had to wait for songs to buffer, and stuff starts almost instantly.

Playlists take some getting used to. Say you browse for an artist and pull up an album. If you click the first song, it will only play that song, then stop. If you want to play the entire record, you have to copy it into a playlist, and play that. Also confusing was the Queue, which is sort of similar to the iTunes DJ. Once your current playlist completes, it will start playing stuff from the queue.

The ads are a bit strange. Most of them are for the Spotify service itself (which is not terrible in itself, compared to Pandora, which is peppered with horrible car insurance ads, etc), or tips and tricks to using the service. It’s odd when they start playing a random top 40 track without any prompt (as an ad for that playlist), so you go from hearing some soothing ambient electronica or obscure indy rock to Chris Brown.

I’ve yet to “discover” any new music on the service. Mostly I’ve been going through and listening to the full discographies of bands I already like. What the service could really use is an auto-playlist feature, similar to iTunes genius, which creates playlists of similar songs/artists for you. I suppose the short clips of random songs are about discovery, but I don’t think Van Halen, Fleetwood Mac, Bob Marley and Johnny Cash need much promotion.

Still, this is currently the best way to listen to music out there, with both the local library of MP3s and online streaming combined in one slick interface. I may fork over the 5$ / month if I end up blowing through the limit. Invites may still be rare – I ended up getting one through this Coke promotion: http://www.spotify.com/us/coca-cola/

On Gamification

Recently there’s been a lot of talk about Gamification. Applying the principles of video games to every day tasks – notably, the addictive “compulsion loop” of grindfests like World of Warcraft and other rpgs. Jane McGonigal’s book Reality is Broken is leading the charge.

The author had recently suffered a concussion, and was consigned to bed rest. She designed some sort of meta-game to make her stay in bed, getting points and leveling up for every tasks (napping, reading magazine, calling a friend on the phone) she completed.

The ironic thing is that lots of gamers have come out to decry this effort as being neither new, nor a good thing. In fact, most corporations have integrated “gamification” into their marketing for the last few years. “Games” that force the “player” to jump through hoops (finding clues on websites or codes under bottle caps) merely to reveal more marketing. Beyond that, gamification adds another layer, a digital / artificial layer on top of reality. Jaron Lanier’s book You Are Not a Gadget goes into the moral reasoning against this. The crux of the argument is that software attempts to digitize the fractal, analog nature of reality in order to control it and manipulate it.

This is one of the fun things about video games. Playing a game takes two stages. The first stage is training your muscle memory to react to the situations on the screen – the timing and button combos, etc. You are basically deciphering the system of the game world. The next step is exploiting this learning to defeat harder and more complex challenges. Because the entire reality of the game (movement in the world, interaction with characters, etc) can be broken down into discrete button pushes, it’s possible to maximize power and utility in that world. This is why video games are fun – lots of power for a few minutes of brain expenditure.

The real world is much more complex. Of course you can’t distill real life conversations, with all their awkward pauses, meta-level politicking, stammers, faux-pas, burst of passion and serendipity into a binary tree of conversation paths (Bioware RPGS). Of course you can’t distill the physics and friction of real life skateboarding (or ninjitsu) into a few flicks of a joystick.

But gamification says you can. It says you can break down reality into these discrete chunks, and the “user” of the system will not only complete the real-world tasks, but feed off the endorphin bursts that come from the “Ding-buzz” of video game accomplishment.

The art of video games is partially because they reside in the realm of escapism. If I play a flight simulation to zoom through the mountains or even drop some digital bombs on pixilated bad guys, it can be fun, even approaching a form of interactive art. If a trained operative is doing the same thing from Langley Virginia, and those bombs and bad guys are no longer digital, what is the difference? For the CIA bomber, inside his own brain, maybe not much. But from a moral standpoint, it’s night and day. See: Ender’s Game.

As our own professions become increasingly digital, and most of our workday consists of manipulating symbolic information on a screen, the lure of gamification will be to turn every tasks into something fun. The danger is that this will mask what those symbols mean in the real world, and the worker bees won’t be directly engaged in moral compromise, because they’ll be having too much fun leveling up their crops in Farmville, or their headshot count in Call of Duty.