Toy producer Sphero has launched two more robots based on droids from 'Star Wars: The Last Jedi,' with the introduction of R2-D2 and BB-9E accompanied by new Swift Playgrounds content that can teach users how to control the Sphero toys by programming in Swift.

Joining the existing BB-8 Sphero toy is R2-D2, the iconic astromech droid that features heavily in the "Star Wars" franchise. Able to move in bipod and tripod stances and having a light-up swiveling head, R2-D2 features the same beeping sounds and movements seen and heard in the movies.

The First Order's BB-9E is a redressing of the rolling BB-8 droid, this time with a dark color scheme and a different magnetically-attached head with LED lighting. Functionally, it works identically to its rebel counterpart, which can roll around the floor while keeping the head-section at the top, and can also emit various noises.

The two new droids are able to be controlled through the Star Wars App-Enabled Droid by Sphero companion app for iPhone. The app offers an augmented reality Droid Trainer, allowing users to drive a virtual version of their toy when it is charging, and can also enable the droids to perform reactions to some of the "Star Wars" movies through its Watch with Me function.

Sphero is shipping the R2-D2 and BB-9E droids from Sept. 1, priced at $170 and $149 respectively.

Two additional playgrounds have been made to Apple's Swift Playgrounds app, which teaches users how to code in Swift using games and activities. The R2-D2 by Sphero playground tasks users with helping R2-D2 find Obi-Wan Kenobi in the deserts of Tatooine, evade Stormtroopers, and explore the Death Star, all using Swift commands.

The Sphero Template is listed as an open template to create programs to control a Sphero toy, using the Sphero API and Swift. While the R2-D2 by Sphero playground does not need the associated accessory to function, the Sphero Template requires the Sphero SPRK+, BB-8, R2-D2 or BB-9E robots connected for it to be usable.

The new playgrounds extend functionality introduced to Swift Playgrounds in June, which allowed users to create their own apps to control a variety of electronics.