java.util.regex Anyone Please Help

I believe I have a loop somewhere in my program, however after hours and hours of searching I simply can not find it.

I would appreciate any help that could be provided.

Basically my Master receives ASCII commands from Serial interface in the form of 6 Bytes starting with A. In the form of AXXCYY where A is the Slave Adress Unit and YY is the Command to be issued.

The Master compiles and works great.

However the Slave "Marker" will not compile.

The intention is that Receiving a command to A00 or A(Unit Address) will issue the command CYY. with YY being the Command to put the slave into.

The Program was working, then all of a sudden I made a stupid mistake somewhere in my code and I simply cannot find it.

Please, Please, Please help.

MX_Track_Master.ino (2.38 KB)

MX_Track_Marker.ino (12.9 KB)

CC1101.h (7.16 KB)

CC1101.cpp (11.1 KB)

What am I missing? The title indicates a problem with Java regular expressions but none of your code is Java. Also, nothing in the body of post makes reference to regular expressions.

What is the compiler output ? The compiler should tell you what's wrong.

This line:

Serial.print(Message Recieved: ");

If the Arduino IDE is giving a Java error it is most likely that you are missing something (perhaps a closing quote) that is confusing Java because whoever wrote the IDE did not build in sufficient error checking.

There is little alternative but careful scrutiny of your code.

Maybe try commenting out various lines to isolate the one that causes the problem.

...R

Here is the compiler Output.

Again, I must have bumped a key and deleted something somewhere, but I simply cannot find it.

Compiler Output.txt (15.1 KB)

Koepel:
What is the compiler output ? The compiler should tell you what's wrong.

This line:

Serial.print(Message Recieved: ");

This is probably the problem - mismatched quotes can royally confuse the IDE.

Also, this issue should be obvious under syntax highlighting.

Also, you should be using F() macro to save SRAM.

That's not the whole message, but I think the line causing your problem is probably the one mentioned in post #2. Java will puke on the code if you have a lone quote somewhere because it starts trying to turn your code into one long string literal and runs out of room for it.

Thanks all for your help.

I found that I had an Integer named the same as a subroutine.

int UnitAddress = 0;

and

void UnitAddress();

Using the same description for a data area as well as a sub routine is a big no no apparently.

haydensmart:
Using the same description for a data area as well as a sub routine is a big no no apparently.

Even if the compiler did not object, it would not be a good way to make code that you could understand 6 months later :slight_smile:

...R