Kids, Arduinos and Quadricopters

I have four children, all with very different interests. My second-youngest, Christopher, age 13, has always liked technology. And last weekend he and I went to see the wild, wacky and creative technology (and other things) on display at the Maker Faire in New York.

I had told the organizers I could give a talk. But a week or so before the event, Christopher told me he thought what I planned to talk about wasn’t as interesting as it could be. And that actually he could give some demos that would be a lot more interesting and relevant.

Christopher has been an avid Mathematica user for years now. And he likes hooking Mathematica up to interesting devices—with two recent favorites being Arduino boards and quadricopter drones.

And so it was that last Sunday I walked onto a stage with him in front of a standing-room-only crowd of a little over 300 people, carrying a quadricopter. (I wasn’t trusted with the Arduino board.)

Christopher had told me that I shouldn’t talk too long—and that then I should hand over to him. He’d been working on his demo the night before, and earlier that morning. I suggested he should practice what he was going to say, but he’d have none of that. Instead, up to the last minute, he spent his time cleaning up code for the demo.

I must have given thousands of talks in my life, but the whole situation made me quite nervous. Would the Arduino board work? Would the quadricopter fly? What would Christopher do if it didn’t?

I don’t think my talk was particularly good. But then Christopher bounced onto the stage, and soon was typing raw Mathematica code in front of everyone—with me now safely off on the side (where I snapped this picture):

Christopher Wolfram on stage at Maker Faire

His demo was pretty neat. He had a potentiometer hooked up on the Arduino board. And he’d set it up so that all he had to do was type a command into Mathematica to get its value:

ArduinoAnalogRead[0]

357

Then it was Dynamic[ArduinoAnalogRead[0]], and Mathematica is dynamically displaying the value in real time as he adjusted the potentiometer.

Then he makes it into a gauge (er, that’s actually from a future version of Mathematica, but Christopher is a keen user of internal development builds):

Dynamic[AngularGuage[ArduinoAnalogRead[0], {0, 1023}], UpdateInterval -> 0]

Gauge dynamically displaying the value

And then he says he’s going to make a dynamic plot of it. And pretty soon he’s typing the Mathematica program, confidently presses Shift-Return—and it actually works:

data = {}; Dynamic[rawdata = ArduinoAnalogRead[0]; AppendTo[data, rawdata]; ListLinePlot[data,Filling -> Axis, ImageSize -> 500], UpdateInterval -> 0]

Plot of potentiometer data

Then he’s on to using an ultrasound sensor, and having it produce musical notes based on distance.

And then he’s on to the quadricopter. He’d been going back and forth with someone at our company for a few days before, trying to get the kinks out of the interaction with the quadricopter’s API. I had seen the quadricopter fly that morning, but I knew Christopher had changed the code quite a bit since then.

His plan was to have a single line of Mathematica code that would make the quadricopter fly a specified 3D path. He had a list of points for a square, entered the line of code, and pressed Shift-Return, and… nothing happened!

I guess Christopher has debugged quite a lot of code in his 13 years. And now he set about doing it in front of the audience. A missing function definition. A missing command to connect to the device. He was finding quite a few things. And I was getting ready to call out that he should just give up.

But then… the sound of quadricopter blades, and up the quadricopter goes… flying its loop on the stage, and landing.

It had actually worked! It was pretty neat, being able to just type one line of code into Mathematica, and then having some physical object fly around in the pattern one had specified:

ARDroneFlyPathGraphics[Table{Sin[u], Sin[2u], {u, 0, 2ฯ€, ฯ€/5}]]

Path for the quadricopter

After another flight, the audience had questions. One person asked if the quadricopter could respond to its environment. Which set Christopher off on some more “spectator programming”. And actually, it took him only a line of code to get the real-time video from the flying quadricopter, and feed it through simple Mathematica image processing:

Christopher Wolfram on stage with the quadricopter flying

I was pretty impressed that all this worked (here is the full video). And, yes, Christopher was clearly right that his topics were very relevant to Maker Faire. In fact, it seemed like Arduino and quadricopters were two of the three main technical themes of the show. The third was 3D printing.

I’d actually mentioned that in my talk (at Christopher’s suggestion), pointing out that Wolfram|Alpha Pro (as well as Mathematica) can immediately make STL versions of any 3D graphic it generates.

And I was reminded that one of my own early applications of 3D printing years before had been connected to another of my children. In 2006, my daughter Catherine (then 9 years old) was very into 3D geometry, and liked exploring the 3D polyhedra that we had introduced in Mathematica 6.

We were just starting the Wolfram Demonstrations Project, and as a sample, we added a little application of polyhedra that Catherine had created with my help:

Polyhedral Koalas

Catherine had 2D printouts of many different cases, and one day we decided to try making them 3D. It took a little wrangling, but before long Catherine and I were off to a little “3D print shop” full of plastic dust, from which a little zoo of polyhedral koalas emerged:

Collection of polyhedral koalas

Every year there’s more and more for me to learn from my children. My oldest child, now age 16, has become a rather successful and uncannily sophisticated entrepreneur—from whom I’m trying to absorb what business wisdom I can. The other three are not yet as “launched”, but each has their definite interests.

For Christopher it’s technology and product design. Learning about every new and emerging technology he can, and developing his own ideas—and often strong opinions—about it. (At Maker Faire, I noted with interest his enthusiasm for getting a Raspberry Pi… and his long discussion about what it would mean to have Mathematica running on it…)

Christopher has always been an energetic explainer of things. But it was pretty interesting last weekend to see him for the first time “explaining” to a large audience. He was definitely the star of our joint speaking slot. And—despite a few tense moments—it was pretty fun for me to see two progeny of very different kinds—Christopher and Mathematicawork together so nicely.

Stephen Wolfram (2012), "Kids, Arduinos and Quadricopters," Stephen Wolfram Writings. writings.stephenwolfram.com/2012/10/kids-arduinos-and-quadricopters.
Text
Stephen Wolfram (2012), "Kids, Arduinos and Quadricopters," Stephen Wolfram Writings. writings.stephenwolfram.com/2012/10/kids-arduinos-and-quadricopters.
CMS
Wolfram, Stephen. "Kids, Arduinos and Quadricopters." Stephen Wolfram Writings. October 4, 2012. writings.stephenwolfram.com/2012/10/kids-arduinos-and-quadricopters.
APA
Wolfram, S. (2012, October 4). Kids, Arduinos and quadricopters. Stephen Wolfram Writings. writings.stephenwolfram.com/2012/10/kids-arduinos-and-quadricopters.

Posted in: Education, Life & Times, Mathematica, New Technology

17 comments

  1. Fascinating event, lovely conclusion.

  2. Way cool. Perhaps Christopher should do a road show to middle schools.

  3. To me, Christopher and his father works togheter so nicely ๐Ÿ˜‰ – Awesome demonstration on the Mathematica’s front too.

  4. I really enjoy your blog, but particularly this post and the conclusion of Mathematica and your son(as Chris Meyers mentioned).

  5. Thanks for putting together this summary. I keep telling people that this one talk was easily the most important thing I saw at the Maker Faire this year. It wasn’t the drone flying, or even the impressive Mathematica skills, but the notion that a 13-year-old could take control of the world around by understanding layers upon layers of abstractions built to make an infinitely complex world as simple as a toy.

  6. Wonderful. Thanks for sharing.

  7. Hi, that was an impressive demonstration! I assume Christopher was using the ArduinoLink package from Wolfram’s intern Keshav Saharia? Any update on a release date?

    I’m a PhD student who devotes some spare time to playing with Arduino, Mathematica and MATLAB (as you can see in my website!) and here in my lab we’re considering integrating Arduino with either MATLAB or Mathematica (we have a campus license for both, they are taught in class, and Arduinos are orders of magitude cheaper than NI I/O boards) for student projects, so a package like that would be awesome!

    I know MathWorks already provides a similar package, but for quick projects I prefer the power and simplicity of Mathematica when it comes to information representation and GUI creation so if you have any info on that, I would appreciate it a lot =)

  8. What a great demo! Kudos to your son!

  9. Wonderful how you can motivate young people with technology!
    When will ArduinoAnalogRead be available for us humans?

  10. Stephen,

    Such a wonderful story, and I wish I was there to experience it myself. When I was slightly older than Christopher, back in Calcutta, I wrote my first line of code on a computer that I built from chips, blank prototyping boards, and 7-segment LEDs. A feeling I will never forget. I know Christopher felt the same way when his quadricopter took flight. Today I use Arduino and other $2 microcontrollers that are far more powerful than my first computer. It is wonderful to see that the youngest generation is once again back into building physical things, and not just play with software. I enjoyed both, but there is something special about the tactile pleasures of watching a physical thing take shape.

    Kunal

  11. Great demonstration what kids can do with modern tools. At this stage I was just typing 10 Print “Test” at my ZX Spectrum computer. Wonderful times we live in!

  12. Cool! Mathematica for Raspberry Pi would be really nice. There are some supercomputers and clusters projects with RPP… it would be a new kind of clusters with simple and cheap computers…

    Moreover it can be a good path for education…

  13. Pretty cool that Christopher is using Ubuntu as his main operating system.

  14. Very nice demo! I find the business of interfacing external devices always a little tricky because you have to go through the operating system. There is a description on how to interface an Arduino on the Arduino website (http://www.arduino.cc/playground/Interfacing/Mathematica). However, I’m looking forward to see Christopher’s code so I can learn some more!

  15. thanks for sharing, makes you proud to be a parent!

  16. I Loved his demonstration. How wonderful to see the difference you’re making in the world. Pouring resources into Kahn Academy will rock. We are blessed to have you co-exist with the rest of us monkeys. ๐Ÿ˜‰ Peace.

  17. Awesome talk. (Saw the video)
    I’m building a community where we will front Mathematica as a universal programming language.
    And my other hobby project is actually building a hoverpod full size (2,2m Diameter), running on Arduino and Mathematica.