arduino simulator

My Guess is you dont have one of the dependencies installed.

J#.NET is the most likely - there is some instructions at the bottom of the virtualbreadboard home page for the dependencies you need. I could bundle them all into the distribution but then it would be 100Mb no 14Mb

Yes, I also support several Microchip PIC Cores and the Basic Stamp - not the propeller yet though it is on the way

ok got it. I needed directX and j# - total maybe 50mb. The VBB is nothing short of amazing. It is nearly as cool as the arduino itself. Below is a picture of the simulator running the button sketch. Bottom left is a window with standard arduino code and the top shows the simulated arduino. Very very cool!

note to VBB: Great product - you should really put a note in the main News section.

Thanks - so glad you like it!

--- note added to News Section, thanks for the Tip.

@VBB...
I downloaded VBB onto my Win 7 x64 pc today and it runs 100% (On your site you state that u'r not sure if it will run on x64 :))

Great sim:) thanx a stack....

Can you pls provide some help on adding Visual Basic Component Libraries?

Once again thx for VBB.. its helping a Embedded nuub ALOT!!

Thats great News, I had hoped x64 would work but had not tested it directly.

I will be setting up a forum shotly over at virtualbreadboard.com to discuss vbb specific stuff like component development. I will post here when that is up.

I am presently adding some more Arduino library support and answering some questions on the supported syntax which is at the moment a bit of a subset of Arduino but I am working to get closer to the Arduino syntax and supported datatypes.

Hi VBB, I downloaded VirtualBreadBoard yesterday and I think it's an useful tool for testing circuits with the Arduino board. Thanks very much.

There is something I don't get it.
For example: how can I recognize the cathode/anode of a LED component? there are some way to add some sort of resistor somewhere?

P.S: nice software though. :slight_smile:

Any chance this is going to run on non M$ platforms?

Any chance this is going to run on non M$ platforms?

I discuss this briefly here.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1270494815

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.

@VBB

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?

Thanks,
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
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1270494815

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.

@VBB,

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,
Charlie

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 intfoo() not intfoo() 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 :slight_smile:

Hi all,

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

Cheers!

I have an error with virtualbreadboard:
SystemType loadexception

Hi,

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.
https://virtualbreadboard.fogbugz.com/default.asp?

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

http://www.virtualbreadboard.com/home.htm#InstallationNotes

Thanks!