lilypad... can't load sketch

I'm on OSX 10.4, arduino 0010 and a happy little lilypad which initially worked fine and loaded the blink example successfully. I'm following Leah's instructions here: http://www.cs.colorado.edu/~buechley/LilyPad/programming.html

But now I'm stuck with that skecth and can't load anything else on the lilypad. I get this error: avrdude: stk500_recv(): programmer is not responding

I hooked up another lilypad and it works fine so I guess my wiring and drivers are okay. I've double checked my port and the board settings and they're what they should be.

What to do?

Are you getting a reset blink?

Could you post pictures of your connection setup?

http://users.dma.ucla.edu/~xarene/x-lilypad.JPG i'm running the blink example to test except that i bumped the delay to 3000 (it hasn't loaded). i think the usb board has its tx backwards... its labeled tx but it doesn't work when i go green tx from usb to tx on lilypad (my image is showing it that way). i did switch it to confirm that and tested it on the second lilypad.

when i hit reset on lilypad, it just acts like nothing happened and keeps blinking every second. only the tx on the usb flashes twice. i don't get the back and forth blinking between rx and tx.

The outer pin of the usb mini is tx, so it looks like your yellow is tx. No damage is done swapping tx/rx, so try both.

i have switched it and it still didn't load.

You might want to remove the glue and check the soldering. And (probably a silly question), are you verifying the code before uploading?

Also, check that you've selected "LilyPad Arduino" in Tools --> Board (that part isn't mentioned in Leah's tutorial, so it's a possibility)

i actually soldered and glued individually so the wires don't touch. besides, everything works fine on a second lilypad board... i can upload the same code, via the same port and yes, i have checked boards>lilypad and yes, i have verified the code. i'm suspicious of the board itself just because i have a second board i'm testing against.

what happens if you disconnect power from the board & then reconnect it? Do you get the reset blink then? or, does it just keep executing the 1 second/blink sketch?

i actually soldered and glued individually so the wires don't touch. besides, everything works fine on a second lilypad board... i can upload the same code, via the same port and yes, i have checked boards>lilypad and yes, i have verified the code. i'm suspicious of the board itself just because i have a second board i'm testing against.

If it's working fine on another Lilypad, then it might suggest the second unit is faulty.

I've got one here which has been cut up, filed down and thrown around, and it still works. But, I had an occasion (today actually) to think there was a problem with it, which turned out to be a wire that was meant to be joined to rx, was in fact connected to tx. For 2 hours, I couldn't see it, so "silly silly" things can happen and hence the reason for questions that sound obvious. Ironically, I also didn't think it could have been something as trivial.

So, eliminate as many obvious things as you can, and if there's still no joy, then it's probably best if you ask the person you bought it off, if they can send out a replacement.

yup. tried everything imaginable. i'm pretty sure it's the board... i have a second board to prove it defective :) thanks.

hi xarene,

what happens when you remove power from the board & then plug it back in? do you get the reset blink then?

immediately starts blinking on the 1second delay… reset doesn’t do anythign either. just keeps blinking…

hmm… So, just quadruple check that there’s nothing attached to your board that might be causing a short or crazy current draw somewhere. It may be that your board is just continually resetting because as soon as it boots up, it crashes because of a short.

But, if you’re absolutely sure that it’s not a problem like this, it sounds like the bootloader got overwritten somehow. This may have been because of a bad initial programming of the board you got–bad lock fuse setting or something… If you have an AVR programmer, like ladyada’s USBtinyISP, try reburning the LilyPad bootloader.

I have the same problem - downloaded my test program that gives three rapid flashes, pauses and then repeats. I've tried to download another program but no go, the instant I release the reset button the lights on the board start their three flash routine again straight away without any sort of delay. The flashing stops when the reset button is down so I guess it can't be a physical problem with the button - is there any fix without bootloader software or is this just a small lumpy glass coaster?

I have the same problem - downloaded my test program that gives three rapid flashes, pauses and then repeats. I’ve tried to download another program but no go, the instant I release the reset button the lights on the board start their three flash routine again straight away without any sort of delay. The flashing stops when the reset button is down so I guess it can’t be a physical problem with the button - is there any fix without bootloader software or is this just a small lumpy glass coaster?

Weird, I got two Lilypads a few weeks ago and both work flawlessly even after being cut down and multiple software revisions.

Your using Arduino10? osx/ pc? (I have both and both work fine with the Lilypad)

Can you post pix of how it’s setup and what your using to power it?

the 3 rapid flashes & then the repeat is the bootloader program, there is nothing wrong w/ your lilypad. If this is what you're seeing then it means you never successfully downloaded any program to your lilypad. check for shorts and bad connections - this is almost always what the problem is. if you don't find any, swap tx & rx to make sure these leads are hooked up properly.

babel, first just try downloading a program. have you done that yet? see:
http://www.cs.colorado.edu/~buechley/LilyPad/programming.html

Note: you need to press the reset button and then quickly upload your program from the Arduino software to load a program on the lilypad. It does not have auto-reset like the diecimilla.

I have also worked with a lot of the sparkfun lilypads & haven’t had any problems. If your really think a board is damaged you can talk to sparkfun about a refund/replacement (they build & sell the boards), but it’s almost certainly just a funky setup connection somewhere or a short in your project if the project is underway…

I have the same problem, basically but i am sure that the board is working correctly. So, i uploaded the bootloader via parallel port programmer by using avrdude on a fresh atmega168 soldered on a lilypad board. I couldn't figure out fuse settings in detail, so i just set the lfuse to internal 8mhz with:

avrdude -p m168 -P /dev/parport0 -c dapa -U flash:w:LilyPadBOOT_168.hex
avrdude -p m168 -P /dev/parport0 -c dapa -U lfuse:w:0xf2:m

Works fine. After switching power supply, the LED blinks 3times in the right speed.

I am using arduino10 with lilypad as target connected via Arduino NG method and the upload of Blinking LED sketch works like charm. But only once. Then it somehow overwrites the bootloader?? I can't upload any other sketch. Neither resetting nor recycling power helps. It immediately starts with the blinking LED! I re-burned the bootloader with parallel port and tried it again. Same thing is happening.

Is it necessary to write hfuse, efuse and lock fuses with particular settings? If so, could you please post them ... since i couldn't find them on the lilypad site and i don't want to brick my m168 again ;)

Thank you so much for your help!

best danny

here are the avrdude commands I use to burn the lilypad bootloader, in order: (the programmer -c & serial port -P settings will depend on your machine...)

avrdude -p m168 -c stk500v2 -P /dev/cu.USA19H1b1122P1.1 -e -u -U lock:w:0x3f:m -U efuse:w:0x00:m -U hfuse:w:0xdd:m -U lfuse:w:0xe2:m avrdude -p m168 -c stk500v2 -P /dev/cu.USA19H1b1122P1.1 -e -u -U flash:w:lilypad.hex -U lock:w:0x0f:m

dunnoknowIO, you may be having the problem because you didn't lock the bootloader memory block by setting the lock fuses properly. could you post a reply about how things go after you reburn w/ the correct fuse settings?

also, just double check that there are no shorts in your USB-serial device (check resistance between + & - & all other combos). This can be something that you don't necessarily think to check, but a short will really mess everything up...

hi leahb,

I was assuming that some lock-bit settings were required after burning the bootloader but those fuse bits are still electronic Babelonian Towers for me ;)

Both avrdude commands worked successfully ... and tata.... it's working! straightforward! Great Support. Lilypad rocks!

Maybe it's an good idea to update your site with fuse settings, as i am not sure how much they differ from standard Arduino atmega168 boards?

Thanks!