1

I am making experiences on the Digispark USB with attiny85 micro-controller. So I programmed it so it can launch very basic keyboard strokes when plugged, i.e, when it is plugged, it open it tries to write "Hello World" anywhere in the opened window on the screen (so if notepad.exe is open it will write on it etc.)

Problem is that I would like to put another code on it, but it's impossible to do anything on the computer when the USB is plugged (because of the looping I coded).

Do you have any idea of how I could solve this problem ?

Thanks a lot

Aymeric

jous
  • 758
  • 6
  • 15
ailauli69
  • 111
  • 1

1 Answers1

1

If you haven't erased the bootloader, the digispark should be programmable for about 2 seconds after you plug it in. How did you program it the first time? For me the procedure in Arduino IDE is to:

  1. Disconnect the digispark usb-cable from my computer
  2. Build the new program
  3. Wait for the prompt to insert the attiny85
  4. Reconnect the usb cable. The writing will start automatically.
jous
  • 758
  • 6
  • 15
  • Do you know a way of working around unplugging and replugging the USB-cable. can we use the reset button to boot into the bootloader? – David Dehghan May 29 '22 at 02:26
  • I don't know. Please make a new question instead. If you would have googled around, you would have found that the answer is "sometimes" or "it depends". You can also just try it. – jous May 29 '22 at 12:22