VBB Troubleshooting

Top problems

1) You didn't install the dependencies, particular J# runtime. See Installation Instructions , VBBCrashes with getVBBDevices

2) You need to save a project before adding the Arduino component to a project. See Problem Adding Component

 

Installation Instructions

The VirtualBreadboard application is a single Standalone EXE. You can simply download it to your desktop or preferred location.

However, VirtualBreadboard has the following dependencies which need to be installed on your computer. These may already be installed on your computer and only need to be installed once.

1) Latest version of DirectX - Click here to download from Microsoft

2) .Net 2.0 Redistributable. Click here to download from Microsoft

3) J# 2.0 Redistributable. Click here to download from Microsoft

 

Arduino Language Support

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.

- DEFINES need to be declared before the setup() code

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

Cant Add Arduino Component when adding it to a New Project

OK - so you need to save the project first because the Arduino Project need to know the location of the directory to save its temporary file into before it can be created.

VBB Crashes

You need J#!! see dependencies info on home page - download these first if you are not sure you need them

SEE Installation Notes

I get Missing c: \ VBB3 | / skin / icons \ motordc.bmp when  I startup VBB

You probably tried to experiment with VBB and use some of the other perspectives like RoboPAL. Good for you for being curious, bad luck that there is a distribution bug with some of these perspectives. To fix this you need to restore the registry setting for the current perspective back to the VBB - Rapid Prototyping System. You need to use regedit to do this or.. wait until the next version if you dont know how to do this

HKEY_CURRENT_USER\Software\VB and VBA Program Settings\VBB.NET\Perspectives\Selected = VBB - Rapid Prototyping System

 I accidently saved over the reference code - how do I restore it?

To restore back to the clean install state you need to delete the Xenocode sandbox directory which is located in your AppData directory

C:\Users\<USERNAME>\AppData\Local\Xenocode\Sandbox\VirtualBreadboard\<Version> directory

I get a runtime error check when using Microchip PIC examples

Make sure MPLAB is installed in the default location or you can change the location in the <VBBDIR>/skin/VBB.xml and change the location

<OPTIONS>

<OPTION name="MPLAB Location">C:\Program Files\Microchip\MPLAB IDE\Core\MPLAB.exe</OPTION>

<OPTION name="MPASMWIN Location">C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe</OPTION>

</OPTIONS>