Losing programming ??

Hi All.
I am using an Arduino UNO and programming via Ubuntu 10.10 (I know there is a new version but it doesnt like my $300 video card !!)

Anyway, a strange thing "seems" to have a happend.
I upload my program via the Arduino IDE, and it works fine.
As soon as I unplug the USB cable then plug it in again, its like the program has gone as nothing happens. I send the program again and it starts working !

Is that possible? to lose the recently uploaded program?
It HAS been working ok, but this just seems to have happend.

Thanks, Jeremy

So your sketch doesn't run when power is applied? How about if you hit the reset button?

That went thru my mind....but I couldn't get my chubby finger into the space between the shield I am using and the UNO to reach the button :slight_smile:

I will try it though. I will find something that will reach :slight_smile:

If it DOES make it work, what would that mean, and if it DOESN'T....what would THAT mean :~

What shield?

just a freetronics terminal proto board Terminal Shield for Arduino | Freetronics

jeremy

Sigh. Okay, so what do you have hooked up on that shield?

I have a GPS conected to 5V and Grnd, then to D2 and D3
Then I have an LCD connected to 5V and Grnd, then A4 and A5

Sorry I just realized I didnt say that earlier.....I meant to.....honest XD

Do you have a link to the GPS you are using?

here is the datasheet.
http://store.fut-electronics.com/Products/PDF/SkyNav_SKM53_Datasheet.pdf

However, let me just say, I HAVE had this all working fine as of Last Friday, where it was programmed then put into my car as I have done 15 or so times already.
That is to say, last Friday I took out out of my car in working order. I did some coding on Saturday to make the LCD screen "Prettier".
Since then is when its been acting up. I have put the original program back on, and still the issue happens where its like the programming is lost.

Jeremy

Time to look for a component or connection which may have become dislodged when you moved the system about.

yes done that. I have also re-done the connections -3 times.
The screen fires up, so it has power, its just not receiving anything.

The thing to remember here is, IF I reprogram the chip, it all works. I unplug the USB cable - i dont move it from its location, then plug it in again....it doesnt work.

This is why i get the feeling the progam isnt staying "programmed"

Jeremy

John Wasser was on the money.
I power up he Uno, then press the reset (there was one on the shield I am using :P) and it works again.

I dont understand why that is. Is someone able to shed on light on it for me?
ventually I want to move this to standalone circuit and pressing reset everytime I fire it up doesnt ring me bell :wink:

Thanks, Jeremy

just a little more to this.
I had a standalone circuit that I was going to use for another projects, so I reprogrammed the chip (ATMEGA328) and I got the same results as before using the UNO.
so I used a wire to rest the circuit, and hey presto, it started working.
Just wanted to add this bit in.

Jeremy

I finally resolved this.
I got to thinking; if I get the same results between 2 diff. setups, the UNO and my standalone unit, then it must be the sketch.
So I fiddled around and remembered the LCD I am using requires a 500ms delay after init-ing it....I DID read it...I just forgot it :blush:

So now, its working as I expect it too....

Jeremy

So I fiddled around and remembered the LCD I am using requires a 500ms delay after init-ing it....I DID read it...I just forgot it

So, now you've added a comment to the sketch, right?