I wondered if the five CDFs and their associated notebooks posted to date on this blog would run unmodified on Mathematica running on the Raspberry Pi. The answer is mostly yes. All but one ran. The Yahoo! Financial Code Generator CDF ran but the notebook did not. This notebook crashed Mathematica on the Raspberry Pi. To be fair, however, the Yahoo! Financial Code Generator needs some work. It runs continuously and should only update once a code button is selected. All version were very slow as well. This means that careful and efficient code is require for responsive operation on the Raspberry Pi.
The Raspberry Pi NOOBS completed its installation and booted into Rasbpian Linux.
The photo below shows it running in GUI mode and a Mathematica plot of Sin[x].
Now, it’s time to figure out if all the hardware drivers are present.
The NOOBS SC Card contained v1.3.0 so I decided to upgrade to v1.3.4 before booting my Raspberry Pi. I downloaded NOOBS_v1_3_4.zip from the Raspberrypi.org website. I also downloaded the recommended SD Card FAT formating tool as well. The NOOBS_v1_3_4.zip file was unzipped and copied onto the 8 GB SD Card after to older version was saved. The copy failed with the following error: file copy error the “parameter is incorrect”. The os\RaspBMC\root.tar.xz seems to be the problem file.
The SC card was reformatted using the full and the quick options but this did not solve the problem. Several site recommended testing the memory using H2testw 1.4. The test took about 40 minutes to write the card and verify it but no errors were found.
I wrote the following Mathematica code to check the download and file but nothing jumps out as a problem.
I’ll run the Raspbian and probably the Adafruit version of the wheezy build so hopefully this will not be an issue going further.
After all this testing and checking, all the files copied over without an error. I still don’t understand what the problem was.
Once I learned that Mathematica and the Wolfram Language are supported on the Raspberry Pi , I could not resist getting it. I started looking at Raspberry Pi at the MarkShed, could not resist the 2.8 touch screen at Adafruit. The photographs below show the components I selected. This is like my fourth order with Adafruit (Arduino kits) and I’ve been impressed with the quality of the components supplied.
I’m interested in using Mathematica as a way to create, display, control, and interact with hardware. Some of the projects that I’m thinking about include:
- Clock radio modification to add Internet music streaming
- Audio function generator
- Impedance analyzer using the AD5933 Impedance Converter Network Analyzer eval board
- Interface with DSP eval boards for signal processing applications
- Interface with a Smartfusion SoC eval board to explore FPGA and analog sampling applications
- USB development board for sensor applications
I use the two textbooks on Mathematica shown below regularly.
Mathematica Cookbook has a lot of good programming examples in science, engineering, finance, and music. It’s for someone knowledgeable about programming and the subject matter and should be considered more of a reference manual.
Mathematica Navigator is more like a Mathematica manual but has a lot of examples. The paperback version was written for Mathematica 6 but the book contains a CD-ROM that has a version of the book for Mathematica 6 and 7. These math books can be linked into the documentation center for quick and easy reference. My complaint is that the version 7 of the book only contains what’s new with version 7. You must search both versions to get all the examples on a search topic.
Getting CDFs to work when embedded in my blog was giving me fits. I would get to the point where the my model would work fine in a Mathematica mathbook, in a CDF preview, in the web-ready CDF run locally , but not when uploaded to my blog. Wolfram support advises that the option SaveDefinitions->True should be used in every CDF you create. SaveDefinitions->True preserves the internal state of all the variables for a CDF. I’ve used this now in CDF using Manipulate and DynamicModule and it definitely works.