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.
-
install arduino IDE on windows (at this point in time i was using 1.8.19)
-
install Digispark drivers(!!) <— this was what was missing in a lot of the youtube videos
- from here (release 1.6.7 at the point in time): https://github.com/digistump/DigistumpArduino/releases
- download Digistump Drivers
- extract, open, find DPinst64.exe and run it
- this should install Digispark drivers
-
try plugging in your attiny85 into your windows device
-
the attiny85 should show up as a ‘Digispark Bootloader’ device
-
if it doesn’t work, try plugging in a usb hub, and then plugging the attiny into the usb hub ()
- says who? says random forum saviour: http://digistump.com/board/index.php?topic=2479.15
-
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.
-
now unplug the attiny, start arduino, go to File -> Preferences
-
under Additional Boards Manager URLs, paste this: http://digistump.com/package_digistump_index.json
-
press ok
-
go to Tools -> Boards -> Board Manager…
-
in the searchbar, type ‘Digistump’ or ‘Digispark’
-
“Digistump AVR Boards” should show up
-
install it and close the dialog
-
now to to Tools -> Board. you should now have Digistump AVR Boards listed under there
-
Select Digispark Default (16mhz) - the most common one
- if uploading doesn’t work, try different boards and hope you get lucky
-
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
-
click Upload (the -> button)
-
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
-
plug in your attiny85
- if at this point your attiny85 is still plugged in, just unplug and plug it in again
-
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)
-
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.
- ref: https://www.youtube.com/watch?v=MmDBvgrYGZs
- a nice explanation of the transistory bits on the attiny85 as well as going through the schematics of the actual thing: https://www.youtube.com/watch?v=eW9WgPlcPAw
- maybe this person says try selecting a different board under Arduino Tools -> Boards: https://arduino.stackexchange.com/questions/47860/attiny85-digispark-clones-failing-usb-handshake-how-to-program-them