Apple brings dancing robots and backflipping drones into Swift Playgrounds

Code rules everything around me. And you.

Really: be it the stoplight you stared at this morning, or the train you rode in on, or the lil’ robot vacuum keeping your floor ever-so-slightly cleaner while you’re away, code is everywhere.

But even for people who’ve put the time in to learn to program, jumping from software to hardware can be a challenge — even if said challenge is just figuring out where to start. How do you program something real? How do you build something that moves?

Apple is taking steps to tackle that problem by bringing third-party hardware — think robots, drones, and musical instruments — into its learn-to-code platform, Swift Playgrounds.

Unfamiliar with Swift Playground? That’s okay — it’s only about a year old. Swift Playgrounds is an iPad app that Apple built to teach people (not just kids, Apple notes whenever talking about it) to code. On one half of the screen, users write code — actual, live, Swift code (albeit code that’s generally executing on top of a more complicated engine behind the curtain) — to complete challenges. On the other half, said code runs at the tap of a button. One lesson might have you move a character around a board one step at a time to teach you how functions work; another might have you tweak the mechanics of a brick breaker game to teach you about variables.

A little over a million people have used Swift Playgrounds since launch, Apple tells me. With today’s news, Apple is working with a handful of companies to bring hardware into the mix. Folks like:

  • LEGO’s DIY robotics line, Mindstorms. Swift Playgrounds will work with EV3, the third generation Mindstorms line that LEGO has been selling since 2013.
  • Sphero’s rolling robots, including the SPRK+ developer bot and Star Wars BB8 edition (alas, no support for that oh-so-awesome animatronic Lighting McQueen RC car just yet.) One of the lessons Sphero showed off involved building a real-world, multiplayer Pong using the Sphero as the ball and your feet as the paddles.

  • Parrot’s Airborne, Rolling Spider, and Mambo drones. The companies showed this off with drones that were controlled by the accelerometer of an iPad running Swift Playgrounds, with the drone backflipping at the flick of the wrist
  • Wonder Workshop’s Dash robot — an upgradeable, sharp-cornerless bot that focuses on being accessible to kids as young as 6
  • The Skoog, a squishy little cube that acts as a programmable musical instrument.
  • UBTECH’s MeeBot kit, the goofy little dancing robot featured up top

Some of these teams had already started tapping into Swift Playgrounds on their own, with Apple having opened Playgrounds content creation to third party developers from the beginning — the aforementioned Wonder Workshop, for example, has been offering Swift Playground lessons for a few months now. Apple embracing the integrations really just formalizes thing, makes it simpler to tie third-party Bluetooth devices into Swift Playgrounds, and adds a bunch of support from Apple’s end.

This is a smart move on Apple’s part, and one that’s pretty characteristic for the company. Apple has used education as a foot-in-the-door (with varying degrees of success) for decades, from sending Apple I’s to schools in the 70s (to prove their prowess over the big ol’ mainframes of the time) to donating tens of thousands of iPads to schools just last year.

But this move potentially helps them introduce themselves to a new level of student — the budding hardware engineer — early on.

Take the LEGO Mindstorms integration, for example. Mindstorms is already used in robotics clubs around the world.

LEGO already has its own development tools for Mindstorms, including one for the iPad. But now they get a solid, ultra newbie-friendly coding platform in Swift Playgrounds. One with its own teaching platform built right in, and one where the most complicated bits of the system (the underlying engine) are largely maintained by Apple.

Apple, meanwhile, gets to pop up in those aforementioned robotics clubs (the stomping grounds of many a lifelong engineer) and say “Hey kids! Learning your first programming language to make that robot dance? Check out our programming language, Swift! Oh, and do it on an iPad!”

It all just makes sense.

These new third-party tie-ins will start working with the release of Swift Playgrounds 1.5, which Apple tells me should hit the App Store on June 5th.