May 122012

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 😉

 Posted by at 4:00 pm

  3 Responses to “Uploaded an app for Apple review”

  1. Android supports native code 🙂 Search for the Android NDK & you should be good to go. It’s what we use to write the NLP/ML code within SwiftKey…

    • Thanks for the tip Paul. Another thing however is that I’ve never done Android development, while I do Apple dev as my day job. Perhaps if this app proves successful I’ll look at taking on the Java

  2. I like the app so far.
    Is it possible to add user input (basically a button press) to the simulator?
    I want to be able to count button presses and display a count.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



This site uses Akismet to reduce spam. Learn how your comment data is processed.