Go Down

Topic: arduino simulator (Read 23578 times) previous topic - next topic


Apr 14, 2010, 03:29 pm Last Edit: Apr 14, 2010, 04:18 pm by VBB Reason: 1
>Any chance this is going to run on non M$ platforms?

I discuss this briefly here.


Summary is: Chance -- yes. Soon? Not so much but it iwll happen.

>there are some way to add some sort of resistor somewhere?

VBB models circuits at the function block level. You need something like SPICE if you want to design at resister level. However as you can see modelling at the function block level is easier and in many ways more powerful.. more on that soon.

>For example: how can I recognize the cathode/anode of a LED component?

Well the LED component has a property to expose the cathode if it is used otherwise it is assumed to be connected to ground by default. However the point is valid and you may have to change the way you look at a circuit a little to make best use of VBB as a software development tool.


yup here http://www.virtualbreadboard.com/ i used it before io  bought and arduino lol you can upload your own code directly for the arduino enviorement after you save it.



This looks great!

I have a sketch that has a PDE file and three cpp files.  Will that work here?  How to I add the cpp's?

Charlie O.


>I have a sketch that has a PDE file and three cpp files.  Will that work here?  How to I add the cpp's?

I was just working on this for the next release right now!

It should work as long as you use only the Arduino language in the cpp files. I will post again when the new release is up - I am including the Morse Example in the next release to show how its done.


Any plans on open source this app?


>I have a sketch that has a PDE file and three cpp files.  Will that work here?  How to I add the cpp's?

VBB 3.5.7 is available now with User Lib Support. See here for more

>Any plans on open source this app?

There is a component development kit (VBBDK) which allows component development from Visual Studio. The user extensibility is called OpenVBB and is an OpenAPI. The VBBDK is available on request if you are experienced with VisualStudio and will be more broadly available soon. Hence the extensibility is open ( which is what most people are interested in anyhow ) but there are no immediate plans to make the VBB application itself open source.



Great news on the CPP files!

One other thing that I've noticed but that might be more difficult...it seems that the systems does not like compiler directives (e.g. DEFINE) after any code statements.  Don't know if that's a complex part of the parser or easy but would be helpful to not have to have the constraint.

Thanks again,


There are still a few uglies to sort out, including yes, I think I limit the search for DEFINES to before the setup() code segment so I will see about extending that search.

The technique I am using is more of a source code-transform than a compile so you can trick it up if your not careful.

Its an emulation of the Arduino language not a simulation of the ATMEL processor so this means

- Inline assembly and generic cpp libraries wont work so you need to only use the Arduino language even in cpp libraries
- Any real-time library - such as PWM or Servo etc will require explicit emulation support implemented by me
- The level of Arduino language support is documented by the examples in VBB - these are essentially my unit tests. If something doesnt work you should send me the example code so I can add it to the example/test suite.
- Some of the data types are different, eg byte is signed, and this can be a problem when declaring a byte more than 128 in value - you need to cast it.
- There are no unsigned types supported but you can work around this usually. The most common is how to use byte.
eg byte a = (byte) 200; // without the (byte) will give an error
    int ubyte = a & 0xFF; // this will make ubyte int = 200 instead of -56
- In general compile time problems can be overcome by explicit casting as opposed to the implicit casting used by Arduino. Its still compatible code but Arduino compiler does some extra work in performing implicit casting which I need to catch up with.
- Standard form declarations should be used eg int<space>foo() not int<space><space>foo() as this can become a problem
- Not all array constructs are yet supported, for example Servo servos[5] should create an array with 5 servos but doesnt and multidimensional arrays can be a problem too.
- Sometimes the syntax editor is marking problems with red unline which are not really problems.

As we go along I will be improving support, adding examples(unit tests) and even more :-)


Hi all,

Re: Arduino simulator, I just found emulino: arduino cpu emulator which is GPL, and posted build instructions on Emulino - Ubuntu Wiki.



I have an error with virtualbreadboard:
SystemType loadexception
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!


May 13, 2010, 09:00 am Last Edit: May 13, 2010, 09:03 am by VBB Reason: 1

If you could, could you make a bug report with some more details here. Especially you shuold report if you are using a particular library because not all are supported.

Make sure you check the installation notes to see if you are missing a dependency



Go Up