Stop a sketch?

How do you stop a sketch?
I clicked the stop button but doesn't seem to do anything.
I'm using the 0018version on 64bit Ubuntu.

The blink example keeps on blinking even after i upload a new sketch.
I assumed when you uploaded a new sketch it over wrote the one before it.
Or is this not the case?

When i plug in my Arduino it's still running any previous sketch i had uploaded.

Is there a way to erase the sketch memory, so when I upload a new sketch it uploads to clean memory

Uploading a new sketch will overwrite the old one.

Are you sure it's uploading? What's the new sketch? The pin 13 LED will blink when the Arduino is rebooted no matter what, so maybe that's what you're seeing.

So the blink sketch will always be blinking?
I can live with that if thats the case.

I was concerned cause I uploaded a temp sensor sketch and saw the
little smd led was still blinking.

Nope, shouldn't be. When you upload a new sketch, it completely overwrites what is already on the microcontroller.

Are you sure it actually uploaded to the board?


Yes It's being uploaded, I can view output on the serial monitor.

I think I figured out what's going on.
I saw this piece of code in the sketch:

void setup() {
pinMode(13, OUTPUT);

The led blinks when it sends data to the serial monitor.
Silly me, I thought the Blink example sketch was still running. ;D

Thanks for your replies.

Well there are LEDs that blink when you send serial data (the serial LEDs) and pin 13 blinks when you are uploading a new sketch and when you press reset. There are probably other times but anyway.

Glad it's sorted now.