Mathematica on the raspberry-pi – a library class

I really like teaching classes through Workshop 88 at the libraries.  Over the summer, I had a chance to teach a few of the classes Workshop 88 offers at some of the local libraries. One library that we like going to wanted a class to introduce their teens and preteens to the Raspberry Pi.

I recruited a few helpers and we gathered up several Raspberry Pis, keyboards, mouses, and power supplies to have enough supplies that the kids would be working in pairs or at their own Raspberry Pi.  We set up before the kids arrived and had everything ready to go. At the start of class we talked about the idea of the Raspberry Pi as a low-cost single board computer and we pointed out all the hardware features of the Pi.  Then we showed off all of the distributions that we had brought examples of.

That took all of 25 minutes for a 90 minute class. Oops.

So, I asked how many of the kids were familar with Scratch, and it turned out that more than half of them had already used Scratch in school.  I decided that they should get a chance to work with Mathematica, so that they would be exposed to something new.

There is a pretty good introduction to Mathematica for the Raspberry Pi on the Raspberry Pi Foundation website. (The actual Mathematica tutorial starts here.)

We did a bunch of things that I think worked really well:

1.) Showed basic math operations
2.) Showed how to make graphs
(One of the kids said at this point that Mathematica is basically just a less powerful calculator. That’s when we kicked it up a notch.)
3.) Kids explored how many digits of pi they could get out of Mathematica.
4.) Kids played with displaying 3D shapes using the Graphics3D function. Examples: Graphics3D[{PolyhedronData[{Antiprism, 4}, “Faces”]}]
Graphics3D[{Opacity[.4], Glow[RGBColor[1, 0, .5]],
PolyhedronData[“JessensOrthogonalIcosahedron”, “Faces”]}]
5.) Kids played with 2D shapes.  Examples: Graphics[Polygon[{pentagon, 1 + .5 pentagon, 1.5 + .2 pentagon}]]
hexagon = Table[{Sin[2 Pi n/6], Cos[2 Pi n/6]}, {n, 6}]

Lastly, we tried to generate some sound files with Mathematica, but it didn’t seem to work too well on the Raspberry Pis.

Overall, I think the kids had a great time playing with Mathematica and trying out a bunch of things that they had no idea a $35 computer could do.