Go Down

Topic: Simulating arduino board (Read 3 times) previous topic - next topic

epanda

No, not equipment, just using loop to display Serial messages on console.

robtillaart

#6
Dec 20, 2010, 10:35 pm Last Edit: Dec 20, 2010, 10:36 pm by robtillaart Reason: 1
OK, I interpreted the question different, second try check if I do understand your question correctly:
you want to debug a sketch running on an Arduino that is not connected to a PC?

If that is the question you could use a simple serial display connected to the TX pin. Or another Arduino that checks if serial output of Arduino 1 is OK.

Could you give an example of code you want to debug?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

epanda

NO

I just want that :

Mycomputer--------x(usb disconnected)-----arduino

And running my sketch to see only ouput serial messages.
loop()
{

  Serial.println("foo")
}
Seeing foo on my console.

robtillaart

#8
Dec 20, 2010, 10:47 pm Last Edit: Dec 20, 2010, 10:49 pm by robtillaart Reason: 1
Quote
my console.

And what kind of device is your console?

something like this - http://www.arduino.cc/playground/Learning/SerialLCD
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Thansen_DK

I was not thinking about simulating external hardware.

What I was thinking was something like epanda wrote, something like registers, variables, i/o pins, and be able to step thru code to see everything works as you expect, add breakpoints and so on.

I am a noob regarding C++ thats why I could use this, C is not the easiest language to learn :-) And believe me if I could program a simulator, I would :-)

As it is now you have to print your variables to Serial to check that your sketch is doing what you expect it to do, this gives a lot of extra coding, and this code must be removed again. I just think a simulator could be a very useful feature, not only for begginers but also for the more driven programmers.

Thomas
Thansen_DK

Go Up