Q&A on WatchDrive
How we put Apple Watch in Gear
Every time we demo WatchDrive to someone coming by our Stuttgart office we are asked a ton of questions. We love that. It tells us that people are somehow fascinated by what they see and want to know more about it. And so we thought: Probably there is no better way to share our story of WatchDrive with everyone than by answering the questions we are asked most often by people when they see the real thing. So here we are: Q&A on WatchDrive.
1.) WatchDrive – What’s that?
A very bold (and not so serious) answer would read: WatchDrive is the first and only system in the world to control and race an electric car entirely from Apple Watch.
A more factual answer would read: WatchDrive is a fun – but still serious – project we created for ourselves to see what we could achieve with Apple Watch. It lets you control minitiaure race cars on a self-built circuit using an Apple Watch as a remote control.
2.) Why did you do this?
When Apple announced Apple Watch it became clear to us that from now on there would be new category of mobile devices. Since we are all about software for mobile devices, it’s been an obvious call for us to get our hands on it and learn what it can and can not do. Our goal was to gather as much real experience (both technically and conceptually) as possible with this new platform as soon as possible. In fact, we have quite a history of getting into new platforms with real projects early. In 2010, when iPad came out we were lucky enough to create two real apps for our customers right away. One of them was featured on the iPad App Store when it launched. Looking back, our approach of experimenting on new platforms early was in many ways very valuable. So we decided to do just that with Apple Watch.
3.) OK, but still: Why WatchDrive?
Truth be told: Internally, we had SOME (colorful) discussions on where to go before we actually started. We looked into many directions. Maybe we should just go the obvious way and extend one of our existing iPhone apps to Apple Watch? As it turned out, none of the possibilities we saw there proved to be “exciting enough“. So we rejected that to come up with something "more extraordinary“. Something new that would also require us to create things we hadn’t had the chance to make before. It should be fun and unique (to us). Not another news app. During our discussions we somehow felt that the watch – more than any other device we knew so far – may very likely be used as a remote control operated from your wrist. Knight Rider style. Apparently – even though we are based in Stuttgart, the "home of the car" – we couldn’t build a real one. But that’s when the “Carrera“ slot cars came to our mind. And there you have it: Why not take one of our beloved childhood gadgets, marry it with our latest adult gadget and build something fun to put into our office? And then we started.
4.) What are the features of WatchDrive?
With WatchDrive one or two players can race Carrera slot cars from their Apple Watch.
For "keen racers" we included "Race Mode". This is 21 laps of pure racing sporting fuel simulation, pit stops and lap timing. The first player to finish all 21 laps wins the race.
In addition, there is also a Hot Laps mode. This allows you (one or two players) to race against the clock and get comfortable with controlling the car from the watch.
Controlling the cars from your watch could not be more intuitive and “Apple Watchy“: Tap to accelerate. Raise your finger to brake. Force-Tap for turbo boost.
Above the track we installed a 27“ iMac. We call it: Race Control. Everything that happens on the track is visualized there (acceleration, lap times etc.). You can also use it to navigate between the different driving modes.
With a mouse and a keyboard? Of course not! With your watch. Directly from your wrist. Using touch gestures and the digital crown!
5.) How does it work?
Creating WatchDrive took very deep engineering. In our everyday projects engineering means writing sophisticated software and often making several software-systems work together seamlessly. WatchDrive took more than that. In addition to creating several software components that talk to each other (Watch App, iPhone App, Mac App), we also built some actual hardware. Roughly, this is what the overall architecture looks like.
This is the full list of hardware components that make up WatchDrive:
- Factory CARRERA GO slot track including two cars
- Arduino MEGA + Motor Shield
- Some magneto resistors and magnets
- An iMac
- Two iPhones
- Two Apple Watches
From a software point of view there are the following components:
- A custom Arduino sketch & a dedicated serial protocol
- A custom Mac App
- A custom iPhone App
- A custom Apple Watch UIKit App
6.) How does the watch app work?
Disclaimer first: This is NOT a standard WatchKit App. You can not do this with the official WatchKit SDK. Therefore WatchDrive will not be available on the App Store anytime soon.
We started creating WatchDrive very shortly after the WatchKit SDK became available. It didn’t take us very long to figure out that the public software architecture of watchOS was in no way suitable to create something like WatchDrive. We missed many of the required key components within the SDK: Native Touch Handling, low-latency wireless communication, digital crown access … The list of things we could officially not do grew longer with every minute we looked into the SDK. So from a developer’s point of view the official watchOS SDK was (and even with watchOS 2 still is) quite disappointing. At least if you want to create something like WatchDrive.
One morning though, we ran across this tweet by the well-known Steven Troughton-Smith:
So… spent a night hacking with @b3ll (& @saurik!) - we got UIKit (& SceneKit) apps running on Apple Watch 🎉 (video) pic.twitter.com/khcpHgVsZo
— Steve T-S (@stroughtonsmith) 12. Juni 2015
We were shocked. In a positive way. Steven essentially proved that watchOS is backed by iOS, thus allowing developers to run fully self-contained native UIKit (not WatchKit) apps on Apple Watch (no jailbreak needed!). While Steven and his team did not disclose any details of how this actually works we knew that if we were able to get UIKit apps running on the watch ourselves all of the things we need for WatchDrive were possible on Apple Watch.
So after a few days of very serious hacking we had our own native UIKit app running on Apple Watch. And we had a video to prove it:
This finally enabled us all the things we needed to make WatchDrive work on Apple Watch: Very low latency Bluetooth LE communication with the watche’s paired iPhone, raw access to digital crown scroll events, force- and multi-touch handling etc.
By the way: A couple of weeks after we finished WatchDrive and watchOS 2 became publicly available, Steven eventually did disclose details of his Apple Watch UIKit implementation.
The approach Steven took was quite different from ours. Still we found it to be very inspirational and we adapted some elements from it into our own implementation.
7.) How does lap timing work?
Ralf (who greatly directed hardware engineering and Arduino development of WatchDrive) soldered some magneto resistors into the track segment underneath the start/finish line. The cars are equipped with some very strong magnets below their body. Now every time a car races across the start/finish line the resistor’s electrical resistance changes which is constantly observed by the Arduino. That way we can measure lap times on each slot and report them over serial to Race Control running on the Mac. There you have it: Ultra-precise, realtime lap times.
8.) What’s the fastest lap time ever driven?
Currently, the Hot Lap record is held by Andreas (the guy who crafted the custom MDF-frame we embedded the track into). The laptime is 4.182 seconds driven with a 42mm Apple Watch Sport (Red Strap) and an Audi DTM slot car. In dry track conditions, of course.
9.) I have a question that is not answered here? What can I do?
This is a living document. Send any questions or racing appointments to watchdrive@21torr-mobile.com and we’ll get in touch.