LilyTiny usb connects/disconnects repeatedly.

I just had the same problem and found this tutorial to get around it: Use of LilyTiny - a clone of Lilypad - qsun.me

In a nutshell, you need to:

  1. Cut and paste this url into your preferences -> 'Additional Boards Manager URLs' area: http://digistump.com/package_digistump_index.json

  2. Specify the board as a 'Digispark Default' 16.5 mhz'

  3. Without plugging in the LilyTiny, upload the code. When the IDE props you to plug it in, only then, plug in the USB to the port you've specified.

Now it should work!