I started working on an iPad app just after Christmas and have today started the process of getting it into the Apple store. I’m not sure if Apple will approve it, since it breaks one of their cardinal rules. Applications may not include cross-compilers. My app is an Arduino simulator. The Arduino is a low-cost open source micro controller. The physical board is about 3×2 inches in size, has a 8 bit processor and 32 KB of usable program space. One of these costs about $60 here in NZ. It has a number of ports that can be connected to digital or analog devices.
This is what an Arduino looks like
The controller can be programmed using a cut down version of C++. I’ve set one of these up with a temperature and humidity sensor as well as an ethernet card. This setup updates a database with the current temperature, then I have an iPhone app that displays the current temperature.
My app includes some UI to draw an Arduino and a circuit board that can hold LEDs and wires to link the components and the Arduino model’s ports. I’ve written simple route tracking code that toggles the state of an LED when a wire is live. I’ve also written my own C compiler that takes a program just as you would write for the Arduino itself and I compile this to my own assembly language. I have a virtual machine that executes the assembly and sets the digital ports on the Arduino model to ‘on’ or ‘off’, then I track the wires and light up the LEds.
This is what the app looks like:
The question is, will Apple allow this app on the App Store? It has an embedded cross-compiler, but it’s all sandboxed, the C code that makes up the program can only blink the LEDs on the UI, though it would be interesting to allow the C code to call a web service.
BTW. Have already had suggestions that I port this to the Android platform. Probably won’t happen; writing a C compiler and VM in Java is a bit beyond me 😉