compiles but wont upload after new if...else statement

Hi All,

I hope this is the right form for this. Anyways I am using a cc3000 on an Arduino Mega 2560. I haven’t had issues with it in the past.

The sketch simply connects to wifi(with success) while printing a value from A0 into serial, and if you go to it’s webpage it SHOULD says whether or not the plant needs water(I am using a basic soil humidity sensor).

All was working until I added the compare (below), now it verifies but its timeouts on upload.

Please help

if (moist != 1)
{
client.fastrprintln(F(“The plant is dry”));
}
else
{
client.fastrprintln(F(“The plant is Wet, Thank You!!!”));
}

Complie.txt (45 KB)

mostiure.ino (10.9 KB)

   client.fastrprintln(F("The plant is Wet, Thank You!!!"));

How old is your board?

Try to limit your overuse of the exclamation mark.

Thank you!, I took out the exclamation mark and all is good. I have a Mega 2560 R3, I think I got in 2013 or so.

The problem is a bug in the old bootloader. !!! causes the bootloader to enter "monitor mode".

Is it a bug? or a feature?

It’s a bug in a feature (“monitor mode”) which nobody ever uses. I think the intent was that 3 exclamation points would put it into monitor mode, but they forgot to ignore “!!!” if it was in data being written to the flash, as opposed to as a command.

If you connect to ISP programmer and “burn bootloader”, you can replace the old bootloader with the new bootloader in which this bug is fixed.