VBB arduino emulator

Hi all....

I am using the a program to emulate the arduino codes and circuits ..... program code is written using javascript (not sure, an example below for defining an integer) .... so how can i write the port manipulation commands such as PORT, PIN and DDR?

for the "int = 2" .... it becomes "static final int = 2"

Hani:
I am using the a program to emulate the arduino codes and circuits

Can you expand on this? You have an Arduino emulator of some sort?

yes

More expansion needed.
Where did you get the emulator ? As you don't know what language it is written in I presume that you did not write it.

the emulator is called VBB and you can write any code there but i have trouble with the writting language cause its a bit similar to arduino program language but with some differences when the code gets complicated

Hani:
yes

Very helpful 'expansion' there. How do you expect us to help you if this is how you respond to requests for information?

PeterH we meet again........ yes was an answer to his question if whether i have an arduino emulator ... i "expanded" enough i think in the second post.... and yet no answer from you still..old habits don't die easily don't they? ...

Give PeterH a bit of a break. This stuff isn't easy to understand:

i have trouble with the writting language cause its a bit similar to arduino program language but with some differences when the code gets complicated

Hani:
PeterH we meet again........ yes was an answer to his question if whether i have an arduino emulator ... i "expanded" enough i think in the second post.... and yet no answer from you still..old habits don't die easily don't they? ...

That was MY question, which asked you to expand on your cryptic statement that you were using an emulator, without telling us anything about it. The answer 'yes' hardly clarifies anything, does it? What is the emulator? Is it intended to emulate an Arduino? The fact it apparently doesn't use the Arduino programming language makes that seem unlikely.

even for me :stuck_out_tongue:

peterH..... hhhhhhhhhhhhhhhhh.... i didn't see that it was ur question....and yes was the answer as i said for ur question if i am using an arduino emulator as i mentioned before...... as for the emulator that is not the problem... the problem is the code writting language as i mentioned in the question....but u seem to be more interested in the emulator rather than the question concerning the program... so go ahead and ask more questions about the emulator and i will happily answer it :smiley:

The code fragment you posted is not JavaScript. Perhaps it is Java.

You haven't actually said anything about the emulator - which one it is, what it does, what you're using it for. All we have so far is that (something) uses code written in (some unknown language which is not 'C or C++ or Arduino) is being used to emulate an Arduino (in some unspecified way), and you don't know how to do it.

Presumably it's not emulating the Arduino runtime environment, since it's programmed in a different language. Is it a hardware emulator, or something? You seem to expect it to be providing a low level emulation of the Arduino runtime environment, but it's not at all clear that is a sensible thing for it to do.

I believe the OP is referring to Virtual Breadboard: http://www.virtualbreadboard.com

yes it's the virtual breadboard.... try it peterH....

PeterH:
The code fragment you posted is not JavaScript. Perhaps it is Java.

You haven't actually said anything about the emulator - which one it is, what it does, what you're using it for. All we have so far is that (something) uses code written in (some unknown language which is not 'C or C++ or Arduino) is being used to emulate an Arduino (in some unspecified way), and you don't know how to do it.

Nope.... that is not the case..... i know how to use it.... i know what it does.... i don't have to explain everything for a simple question like that..... i was just asking about the programming language nothing else.... there is no need for u to know what does it emulate nor how ....... my question is simple and my problem does not require such details....

And if u bothered to "GOOGLE" what is the VBB arduino emulator u would have known what it is.... don't expect the answer to be spoon fed to u

Look, Hani, the world of computers is filled with acronyms. I thought for a while you were talking about Visual Basic (VB). If you are going to throw in an acronym like VBB it would be courteous to provide a link, as Quick5pnt0 eventually did, so we can see what you are talking about.

If I may suggest, asking how to do something in VBB would be best directed to the VBB web site. How are we supposed to know?

And since this is the programming section, how about posting some code?

Read this before posting a programming question

Your original question:

program code is written using javascript (not sure, an example below for defining an integer) .... so how can i write the port manipulation commands such as PORT, PIN and DDR?

is pretty meaningless here.

This is a forum for answering programming questions about the Arduino (and therefore in C or C++). Not Javascript questions about a Virtual Breadboard.

If you want US to help YOU then the onus is on YOU to provide enough information about your problem for us to understand it. We should not have to Google for links to the product you are using and guess whether this is the right one.

You're asking about how to use an emulator. You assume we know which one, but you haven't told us (until somebody else suggested which one it might be). You imply that you expect it to provide a runtime environment similar to the Arduino one, although it is clearly NOT using the Arduino hardware, runtime software or even the same programming language, and you've declined to explain how this relates to Arduino. My conclusion: it's nothing to do with Arduino. If you want to know how to use the emulator, go ask the people who supply and support it.

This was helpful Nick Gammon .... ok I attached some photos of my work.... and here is the code

import muvium.compatibility.arduino.*; 


	static final int voltone = 2; 
	static final int volttwo = 4;
	static final int voltthree = 7;
	static final int voltfour = 8;
	static final int voltfive = 9;
	static final int voltsix = 10;
	static final int voltseven = 12;
	
public void setup()   
	{   

	    DDRD = DDRD | B11111100;
	    DDRB = B00001111;
	} 


	public void loop()      
	{ 
		PORTD = PORTD |B11111100;  
		delay(500);
		PORTB = B00001111;		
		delay(500);
	}
}

My question is that how can I use the port manipulation commands in this arduino emulator?

PeterH:
We should not have to Google for links to the product you are using and guess whether this is the right one.

You're asking about how to use an emulator. You assume we know which one, but you haven't told us (until somebody else suggested which one it might be). You imply that you expect it to provide a runtime environment similar to the Arduino one, although it is clearly NOT using the Arduino hardware, runtime software or even the same programming language, and you've declined to explain how this relates to Arduino. My conclusion: it's nothing to do with Arduino. If you want to know how to use the emulator, go ask the people who supply and support it.

no need for you to know which emulator is that in order to answer .... the type of the emulator is irrelevant to the subject.... my question does not involve the emulator capabilities... my question was PURE programming