Show Posts
Pages: 1 2 [3]
31  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Compiler doesn't compile a particular sketch. on: January 25, 2013, 03:00:40 pm
Amen
32  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Compiler doesn't compile a particular sketch. on: January 25, 2013, 01:41:08 pm
Ok, I understand now. The only thing that puzzles me is that I copied the code from another sketch, and that sketch worked just fine. I'll go read up on this stuff on my own time. Thanks everybody smiley
33  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Compiler doesn't compile a particular sketch. on: January 25, 2013, 11:31:29 am
So in the original sketch I changed " temp[ 25 ] = '\"'; " to " temp[ 25 ] = char(34); "
It compiles now, and should work, but I'd still like to know what the problem was (is?). Technically there is nothing wrong with the way it was.
34  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Compiler doesn't compile a particular sketch. on: January 25, 2013, 11:24:17 am
thanks billroy
35  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Compiler doesn't compile a particular sketch. on: January 25, 2013, 11:16:01 am
Ok, so I kind of started over, and compiled the sketch after every action I took, to check where the problem started. I didn't solve the mystery, but I might have learnt something new.

Before I can explain what exactly happened, the reader needs to understand how I'm structuring this program.

I have two separate sketches I copy from: one that contains all the code necessary for control over the onboard real time clock (RTC), and one containing all the code necessary for control over the GPRS Shield I'm using.

My main objective is to log the times the Shield receives calls, and use the Shield to send data via text message at a predetermined time.
For this I simply need to combine my two aforementioned sketches, and add a few bits and bobs.

So everything I'm doing kind of happens in two halves: GPRS and RTC.
For my own sanity's sake, I keep the two devices' code separate.

Also, the function gprsListen() is the only GPRS function called directly from void loop(), and it's location actually made a difference, see below.

In the first sketch I attached, the order of all the parts were as follows:
  includes for both devices
  #defines for RTC
  variable declarations for GPRS
  variable declarations for RTC
  GPRS functions (including the function gprsListen)
  RTC functions
  setup
  loop (calls the gprsListen() function and updates the time)

The above structure made the compiler go all stupid. Now for the new structure (attached file):
  #includes for both devices
  #defines for RTC
  variable declarations for GPRS
  variable declarations for RTC
  RTC functions
  GPRS functions
  setup
  loop (calls the gprsListen() function and updates the time)
  gprsListen()

Ok, so there are 2 major changes, and 1 very weird thing:
  change 1: I had to swap the GPRS and RTC function bundles
  change 2: I had to put the gprsListen() function somewhere below setup. Anywhere above setup, and the compiler goes all stupid again.
  Very weird thing: In void setup() there is a Serial.println(""); indicated with a comment. If you comment it out, the sketch still compiles. If you delete the command, or only the quotes, the compiler goes all stupid with the same error.

Remember, effectively there is almost no difference between the sketches. They contain all the same functions and variables, I just pasted them in different places.

I don't know what any of this means, maybe you guys do.
Thanks so far
36  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Compiler doesn't compile a particular sketch. on: January 25, 2013, 08:41:03 am
Thanks, appreciate it smiley
37  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Compiler doesn't compile a particular sketch. on: January 25, 2013, 08:09:32 am
Cool, I'll do that.
Thanks
38  Using Arduino / Interfacing w/ Software on the Computer / Arduino Compiler doesn't compile a particular sketch. on: January 25, 2013, 07:52:28 am
Hi

I'm relatively new to everything here, but I've been spending a lot of time developing some sketches, and, until now, everything's been working fine.

For some reason the attached sketch cannot finish compiling. The little progress bar only gets to about 20%, and the compiler gives an error that starts with "Exception in thread "Thread-4256" java.lang.StackOverflowError", and is followed by hundreds of lines starting with "at java.util.regex.Pattern$".

It looks like this:
Exception in thread "Thread-4256" java.lang.StackOverflowError
   at java.util.regex.Pattern$CharProperty.match(Pattern.java:3344)
   at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
   at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
   at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
   at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
   at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
   at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
   at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
   at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
   at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
... and it goes on and on and.

Please take a look and see if I'm missing something. I lack experience smiley-fat
Please note: a lot of the code is copied from previous sketches.
Oh, and it's still a work in progress, not a polished piece of machinery

Thanks, and forgive the newbie tendencies smiley-razz
Pages: 1 2 [3]