What's volatile? Can't keep sketch installed

The EtherTen combines an Uno-equivalent Arduino-compatible board and Wiznet-based Ethernet support, along with a microSD card slot and Power-over-Ethernet support. [Product page]
Post Reply
Joined:Sat Jul 14, 2012 1:53 am
Location:Dee Why NSW
What's volatile? Can't keep sketch installed

Post by ngp99 » Mon Aug 20, 2012 5:50 am

This is probably some silly newbie error........

I have successfully run two sketches. The EtherTen is running off the USB cable only. I understand from the Arduino Forum that a new sketch simply overwrites an existing sketch.

The first is Blink. I could not get it to run at first, but I got a result when I attempted to upload the example from the IDE. I therefore assume that this is the one that is working. If I disconnect the cable and then reconnect, Blink starts automatically. I amagine this is all as expected.

The second sketch is a modification of Blink that sends text to the monitor, hence the TX LED flashes too. If I disconnect and reconnect the cable, only the red LED flashes. I get no signal at the monitor and, unsurprisingly, no flash from the TX LED.

I therefore assume that Blink is back in business. My sketch does no overwrite it. My sketch is volatile, Blink is not, but I believe I used the same procedure to install both.

Once the power is up and we have just the red pulse, if I call up my sketch with the IDE, verify, and upload, the EtherTen does what I expect it to every time. I see the text and the yellow flash.

I assume the bootloader does not include a Blink sketch.
I understand that sketches are stored in flash memory, therefore non-volatile, so how come I cannot retain my modified sketch?


Further to this.

While the above situation seems to be consistent, I have now uploaded a third sketch, the LCD HelloWorld. This did not work. Anything that could and should light up did, but there was nothing on the screen. I'll worry about that later. More to the point, when I disconnected and reconnected the power, I got no blinks, just the blue light. I uploaded my modified Blink, again, and it is working as it should.

Once I got Blink to go originally, it never failed to work on power-up. I don't know if the LCD sketch was resident or not.
Last edited by ngp99 on Mon Aug 20, 2012 7:58 am, edited 1 time in total.

Joined:Sat Jul 14, 2012 1:53 am
Location:Dee Why NSW

Re: What's volatile? Can't keep sketch installed

Post by ngp99 » Mon Aug 20, 2012 8:34 am

Thanks for your attention - again!

Blinky was running. Now pwr on/off and we are back to just Blink.

Edit Blink, change both delays to 100 , verify, upload.

Now there was a hiccup here. I am working on COM6. The IDE could not find it even though the board was working as it should. I unplugged the USB and plugged it in again, then checked the port with the IDE. OK, COM6 has a tick.

Try uploading again. OK. The blink rate is much faster.

Unplug > wait 10sec > replug USB.

OK, it is clear that the LED is flashing at the new speed.

Repeat. Same result, both version of Blink survive the power going off. OK, I guess I must now conclude that my sketch Blinky is not kosher, even though it verifies OK and works like I expected it to. Blinky is listed in my previous thread. I have just uploaded Blinky again. The IDE shows nothing untoward in the cyan or black reporting areas.

Now here is something else.

If I

1. have the fast version of Blink, it survives the power off

2. load Blinky, it won't survive the power off AND

3. I don't get the fast vesion of Blink, I get the original 1Hz version!

Thanks again for your time.

Post Reply