May 222012
 

Well, I am surprised. Apple approved my app. First time.

I’ve now made a few changes. I improved my compiler error handling, and I’ve got a mechanism for users to add their own programs. Now I’m going for review again. Apple are currently taking a week to review apps so hopefully Simduino will be available next weekend.

Next task, write a support web-site so I can log people’s feedback

 Posted by at 11:20 am

  6 Responses to “Simduino app approved”

  1. Hi Derek,

    I am suitably impressed with your Arduino simulator app. Great effort! Is it possible to add other hardware such as motors, servo’s etc?

  2. Hi Brian

    The main difficulty here is that ideally motors and servos would be real devices. I can get away with LEDs in the simulator because they are just lights that show bright or dull. But a motor would need to be shown to move and a simple graphic wouldn’t be too satisfying, you actually want a real motor and to see it spinning.

    Given that, the major problem is connecting an iPad to anything in the real world. There is a cable (from Redpark) that could be used – it has a TTL connector at the end. But it’s a specialised piece of kit (and not cheap). I have never actually used it. Or I could provide a web-service interface – much like the Ethernet board for the Arduino, and implement the comms to talk to that. Then Simduino would be able to talk to any web service. Maybe that’s the way to go. Could be a serious amount of coding there though and I’m not sure I have the heart to do it.

  3. Hello,

    I see that i bought on old app with simduino…but it gives good error reporting in the compiler.
    I have written a small program using the millis() function. The app crashes on that application..the compiler gives no errors.
    Could I send the code to you for a quick explanation why the app crashes?
    My program just lets blinking a led with 6 frequencies that change every minute.
    Please, give me some help.

    • Thanks for the query. Simduino is actually a fairly simple program, although it does some very involved things. It can compile a C program into my own type of machine code, this it can run that machine code in my own virtual machine environment. It is completely isolated from everything else running on the iPad – as are all iPad apps (they run in a sandbox). A C program can have most of the C language structures, variables, if statements, for loops and so on (no switch statements – they proved too hard to do!). However the program only supports the standard C language, not the libraries that Arduino developers are used to. I added a few of the Arduino functions (delay, pinMode and digitalWrite) since these are needed for blinking the “LED”s. However I don’t have a real-time clock in my virtual machine so it’s not possible to implement a millis function. If you want to have a varying frequency, you could try using different values in a delay call – but you would have to maintain your own counter for how long your programs been running. It may not be very accurate, but should be pretty close to the actual number of milliseconds.

      I wrote Simduino six years ago as a challenge to myself to write a C compiler. It doesn’t sell very many copies on the App Store – perhaps 2 a week!, so it’s more a labour of love than a money maker – that’s why I haven’t added new functionality to it. However now I have read your query and thought about it, maybe I could implement a millis function – it just gets the number of milliseconds since the program started running. I may not be able to return very accurate values, but perhaps it would help you. In any case, having the app crash instead of giving a “function not found” error would be something I should do.

  4. Thank you very much for the reply. My program seems to work on a real nano….but still crashes on the millis function. I would be very gratefull when you could include this function in your compiler, because all sites say that millis() is much better than working with the delay() function, which stops the arduino completely during the delay time.

  5. I mean that it crashes in the simulator, not in the real nano….

 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>

(required)

(required)

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