I have a number of sections in my code and I can't follow it with all the variables. I think it would be much easier with single step.
I have a number of sections in my code and I can't follow it with all the variables. I think it would be much easier with single step.
Bill
The standard IDE doesn't have the capability.
the arduino IDe is an editor, and then it compiles and uploads it into the micro.
However there are some other programming tools that will let you see the variables, and even change them on the fly.
12blocks is something that might help, but I'm not sure if Hanno allows an existing sketch to be imported.
MegunoLink is another that allows data to be sent via the serial.
MegunoLink | A development and user interface tool for your embedded projects
Debugging is a painful game, best served with simple but meaningful serial print commands.
If possible add a delay so it doesn't fly past, and try to concentrate on one section only at a time.
I've also flashed an LED before.
Maybe you could upload the code (use the >> syntax highlighting) and indicate what isn't working, and someone might be able to assist.
I know how frustrating it can be sometimes, and then when you find it you go duuh.
mark
Alternatively you can port your project to Atmel Studio and use the AVR Dragon to single step through your code.
Since Arduino is C++ based, you may be able to lift some bits of the code and write test-code for it to run on your workstation, or step through it there. You would have to provide dummy functions for the Arduino bits - but consider those places to insert test conditions. You could then step through it with Visual Studio or GDB gui (like the stuff in Eclipse CDT), or write your test code to verify the results.
Thanks for the info/ I was afraid of that. Sometimes I wish I could go back to Basic. That dates me doesn't it.
Well all you had on the C64 basic was print statements and you do have those over serial... I still use prints far more often than a step debugger even when in python and a very pretty ide.
To be honest; then go the length and use Atmel Studio. It's a PITA to download (near 1 GB?) but with a proper debugger you'll be asking yourself how you've ever written code without it. Single stepping, breakpoints on interrupts (also on BAD_ISR), watching values in tables / structs... Invaluable for larger projects.
Just a thought, you could also use a Texas Instruments Launch Pad instead of an arduino, practically the same to code when using Energia vs the Arduino IDE but yu can run the Energia Code on the CCS (Code Composer Studio) and have full hardware debug capabilities including looking at registers, memory and the usual break points
As I said, just a thought
Basic does not date you that much. I am 15 and I use basic to make simple programme when I am away from my desk using a z88. It is a very nice language and I feel it is slightly disappointing that it is dying out.