Swift Playgrounds is Apple’s iPad app for learning to code in the Swift language. The new template lets you make R2-D2 move around, spin its dome head, wobble on its legs, flash lights, and more.
Sphero introduced its new R2-D2 and BB-9E robots on Force Friday. They come with their own iPhone apps, but Swift Playgrounds gives you more control over the devices, plus you get to learn coding skills in a fun way.
Sphero templates for controlling BB-8 and BB-9E are available, too.
Swift Playgrounds is a free download for the iPad. To install the R2-D2 template launch Swift Playgrounds and tap Get Playground > Accessories.