Problem Uploading - Fall detection Project.

I am very much a newbie to the arduino code and have had a lot of assistance with my project so far.

I have now got a working code and it has worked perfectly with a borrowed Arduino Uno. However now I am testing myself I am using my Mega2560 board and the code won't upload. There is no error message the upload is just timing out. The RX/TX flashes as it begins to upload but then begins blinking every second and continues to say uploading.

Is it something to do with using a different board? The board is okay with other programs so can't see why this board should be any different to the uno i used previously.

Program is attached. (Ignore notes, had lots of debugging and a dodgy accelerometer.)

fall_final.ino (8.79 KB)

  Serial.println("Success!!!");

Doofus!!!

It won't upload on my Mega either.

...R

!!! is used by the bootloader change it to !! or !!!! and things will be ok You can't use !!! in a string with the arduino bootloader.

Mark

holmes4:
!!! is used by the bootloader change it to !! or !!!! and things will be ok You can't use !!! in a string with the arduino bootloader.

As far as I'm aware it will find the three exclamation marks in !!!!.

holmes4:
!!! is used by the bootloader change it to !! or !!!! and things will be ok You can't use !!! in a string with the arduino bootloader.

Mark

How interesting. I wonder where they tell you that :slight_smile:

...R

Great thanks for the advice,

the irony of the problem being 'Success!!!'

Looks like @PaulS spotted the problem but his advice was too cryptic.

I had assumed he was making fun of the writing print "Success" in a program that wasn't successful.

And, how do you include "!!!" in a sketch? Is there some escape code?

...R

And, how do you include "!!!" in a sketch?

See that key up there, on the top row, just to the right of the ~? Bang it three times.

PaulS:

And, how do you include "!!!" in a sketch?

See that key up there, on the top row, just to the right of the ~? Bang it three times.

@PaulS, sometimes you can be very helpful and other times not. This is one of the "not" times.

An earlier post said that the bootloader treats "!!!" as something special which was preventing the OPs code from uploading. I had assumed from your earlier post that you were aware of this but chose not to explain the problem.

You know perfectly well that I know how to type three exclamation marks just as well as you do. I'm pretty sure you also know that I was asking how to get around the bootloader's treatment of "!!!". If you know, please tell us and also tell us if you don't know.

On the other hand you know that the "!!!" is not the problem preventing the OPs sketch from uploading but you are not prepared to share your knowledge with us.

...R

I vaguely remember that there was an updated bootloader that fixed that stupid "!!!" bug, but that may have been wishful thinking. If the "!!!" is only used in a text literal then you can either break the literal up so you don't get three adjacent '!' characters in the code, or roll your eyes at yet another unnecessary Arduino gotcha and just use a different string such as "! ! !".

I had assumed from your earlier post that you were aware of this but chose not to explain the problem.

I was. I thought that the subtle hint I gave might have been enough to get the OP to remove the excessive punctuation, and see that the code that actually uploaded. I figured if that happened, then OP might actually search for previous mentions of the problem.

For too subtle a hint, I see. Oh, well.

You know perfectly well that I know how to type three exclamation marks just as well as you do.

I thought you did, which made the question strange.

I'm pretty sure you also know that I was asking how to get around the bootloader's treatment of "!!!". If you know, please tell us and also tell us if you don't know.

No, I didn't read that into your question. As far as I know, the only way to get the bootloader to not get hung up on the !!! is to not use !!! in the sketch. It simply isn't value added.

PaulS:
As far as I know, the only way to get the bootloader to not get hung up on the !!! is to not use !!! in the sketch. It simply isn't value added.

Thanks. I'll try to remember to avoid three exclamation marks.

...R

Thanks. I'll try to remember to avoid three exclamation marks.

...R

Or three of any punctuation symbols...

PaulS:

...R

Or three of any punctuation symbols...

:stuck_out_tongue:

PaulS:
Or three of any punctuation symbols...

Sh--, is it that bad ???

...R