Pages: [1]   Go Down
Author Topic: Debugging frustration  (Read 743 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm only a newbie to Arduino, but I have quite a lot of previous programming experience.  I find de-bugging quite a frustrating experience.  In order to monitor how my programme behaves, I have to included code which is unnecessary for the finished project (e.g. to echo outputs to an SD logger onto the serial monitor).  And we have to upload the code, and let the device struggle before we realise that there must be a problem with the code.

I have 2 suggestions:
  • Would it not be possible to set up a virtual Arduino on the computer where you have the IDE running, purely to get the code behaving right before upload?
  • Can the IDE be structured so that it is possible to view two pages at once, or to split the screen?
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 443
Posts: 23835
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Re: suggestion 1, I typically have other hardware connected to the arduino which the software interacts with. Modeling the software only is not very  beneficial.  I would think writing code to simulate those external devices would just be a path to introducing more errors.
Have you looked into any of the Atmel ICE devices?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24449
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

More here
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can the IDE be structured so that it is possible to view two pages at once, or to split the screen?

You can configure it to use an editor of your choice, or simply open the code yourself in a separate editor (that is one page) and view the other one in the IDE.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, thanks eveyone, it seems there are workarounds.  I'm very respectful of the simplicity of the Arduino project, so I withdraw my suggestions! 

As  someone noted in that other thread, it's when using libraries that I run into the biggest problems, because I don't understand how they work unless I spend days delving into their code.  I guess I just need to be more methodical and build up my Arduino programs in smaller chunks.
Logged

Pages: [1]   Go Up
Jump to: