Arduino Emulation on PC

I have worked on this for a while and was able to run arduino code on my PC. This is to make debugging much easier and compiling much faster (1 second compared with minutes of compile and upload). Since the purpose was to develop phi_prompt programs, I only made emulations on key Arduino functions, liquidcrystal, DS1307, phi_interface, and phi_prompt libraries. There are no real hardware hooked up to arduino. Future development may include some limited feature such as digitalWrite or other hardware that I might need for projects. Here are some pictures to accompany my previous post about the professional development kit for phi_prompt:

The supported Arduino stuff is here:

millis();
microSeconds(); //Good luck with this on a multitasking operating system!
delay();

PROGMEM related definitions and functions. Seems to be working with “c-strings in PROGMEM and a pointer array in PROGMEM to point to these strings”. I have not tested other data types. Be careful with this though, pitfalls may still exist
strcpy_P();
strlen_P();
strlcpy(); // This is only available with GNU C not a standard one but I need it.
pgm_read_byte();
pgm_read_word();

LiquidCrystal library. Will work on write(char), print(int) and print(float)

Everything except for below functions, which I don’t use
        void noDisplay();                                                         ///< Turns off the display
        void display();                                                           ///< Turn on the display
        void scrollDisplayLeft(); // Hate these scroll functions. Useless
        void scrollDisplayRight();
        void leftToRight();
        void rightToLeft();
        void autoscroll();
        void noAutoscroll();
        void createChar(uint8_t, unit8_t*); // I can’t create char on PC

DS1307 all working except for this one I didn’t implement. Easy to do though. Also start and stop have no actions. You can’t change DOW without changing dates.
    int get(int, boolean);

phi_interfaces input device library only has the phi_serial_keypads class which takes inputs from keyboard. Function keys are wsadfg of course (who didn’t play some FPS games?)

phi_prompt user interface library works except that the right arrow looks different and the scroll bar is not as awesome as on real LCD

Phi_prompt advanced features video demo

I have developed many features with my famous phi_prompt user interface library. These features are too specific to be turned into library function calls but I have a well-documented set of examples for lots of these features that will open your eyes.

These feature code and some professional consultation will be offered under “Arduino User Interface Professional development kit for phi_prompt” together with a PC emulation engine that you can emulate arduino and tweak on a PC with debugger and use your keyboard to operate the emulated code and copy paste to arduino to load to arduino when you are finally satisfied. It saves you tons of time for waiting for uploads and saves your hair from pulled off when debugging with arduino IDE.

Here is a video, take a look at these eye candies features:

I’ll be adding more features including variable length of list (say you adjust one parameter and the list expands to show its details).

By no means can I support newbies with these features that can’t even be turned into generic library function calls but to more experienced people trying to make money with their products, these features add values. Hope I can use fund I get from professional help with professional projects using these features to support the free end of my library (actually all library function calls are free to use but how you use them to make advanced features are not yet open).

Minimal equipment for Arduino newbies

As a long-time member of the Arduino forum, I often find it frustrating to help some newbies get their feet wet with DIY electronics. Partially it is because that the newbies don’t have the basic tools and parts to proceed with simple projects. So I thought to myself, after a few members’ discussion, that I should put together a list of minimal equipment for an Arduino newbie to start their journey with Arduino so when they need help, they have basic parts and tools to get the help. Here is a list:

  1. Arduino UNO with USB cable – Highly recommend newbies to purchase genuine Arduino UNO to avoid potential problems of a clone
  2. One small breadboard at least 30 rows prefer with buses – sooner or later you will need to set up a circuit on this breadboard, not everything can be simply plugged into Arduino
  3. One bag of random resistors a few small tactile push buttons and LEDs – you should have some 10Kohm, 300 ohm, 150 ohm, etc for various circuits
  4. One set of jumpers, at least include 5 colors and 30 pieces – this ensures when you are seeking help, the circuit is connected not with all same color wires, a horrible scene for any helper
  5. One simple multimeter – This ensures if you are instructed to check voltage or continuity you can do so with it
  6. One or two 10K potentiometers that can be plugged into breadboards – This ensures you can make some voltage divider to play with analog inputs in absence of any actual sensors and to hook up an LCD contrast circuit

A lot of newbies ask what kits to buy but the above should get anyone a good starting point. Your future project relies on your own interest so you can pick your own sensors or actuators when you have a project in mind.

As I was finishing this post I searched some well-known Arduino distributors and the following from Adafruit doesn’t look too bad for beginners:

Starter kit:

http://www.adafruit.com/products/193

Adafruit budget kit

 

Multimeter:

https://www.adafruit.com/products/71

Adafruit basic multimeter

I just asked Adafruit for permission to use their pictures on my blog and they replied within 10 second with a yes 🙂