Arduino + Digispark (clone) on Windows 10

Before i start forgetting this in the next ssd windows reformat...

so you wanna bumble around with your aliexpress digispark attiny85 clone.

  1. install arduino IDE on windows (at this point in time i was using 1.8.19)
  2. install Digispark drivers(!!) (this was what was missing in a lot of the youtube videos)
  3. try plugging in your attiny85 into your windows device
  4. the attiny85 should show up as a 'Digispark Bootloader' device
  5. if it doesn't work, try plugging in a usb hub, and then plugging the attiny into the usb hub ()
  6. my attiny85 does the helloworld of arduino boards, the blink example. if yours:
    • had the power light on for > 5 secs
    • then starts blinking on and off every second
    • then your attiny85 has firmware installed and probably works.
  7. now unplug the attiny, start arduino, go to File -> Preferences
  8. under Additional Boards Manager URLs, paste this: http://digistump.com/package_digistump_index.json
  9. press ok
  10. go to Tools -> Boards -> Board Manager...
  11. in the searchbar, type 'Digistump' or 'Digispark'
  12. "Digistump AVR Boards" should show up
  13. install it and close the dialog
  14. now to to Tools -> Board. you should now have Digistump AVR Boards listed under there
  15. Select Digispark Default (16mhz) - the most common one
    • if uploading doesn't work, try different boards and hope you get lucky
  16. now open a digispark example under File -> Examples -> Digispark_Examples and pick something not too intimidating that works without the extra pins (we're testing upload after all). for example, the "Start" example.
    • hopefully it looks like the one you see below in the example
  17. click Upload (the -> button)
  18. it should compile, and then wait for the attiny85's bootloader mode to upload.
    • this is actually the <5sec window when the attiny85 is first plugged in
  19. plug in your attiny85
    • if at this point your attiny85 is still plugged in, just unplug and plug it in again
  20. wait
    • it should take a bit to upload your file
    • after it's done it should say >> Micronucleus done. Thank you!
    • your attiny should also be running the new code
    • (actually it will be running the blink example again.. and since it looks the same, maybe try changing up the delay in the code and reuploading it)
  21. explore the other things you can do with your properly set up attiny85: https://www.hackster.io/digispark/projects

// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(0, OUTPUT); //LED on Model B
  pinMode(1, OUTPUT); //LED on Model A  or Pro
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(0, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(1, HIGH);
  delay(200);               // wait for a second
  digitalWrite(0, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(1, LOW);
  delay(200);               // wait for a second
}

ah wait, this is actually exactly what i was looking for. after i've solved it. hmm. https://theiotprojects.com/program-digispark-attiny85-with-arduino-ide/

here are some refs for when the above doesn't play out magically like you want to.