5

Windows 7 (64Bit) Parallels VM on Macbook Pro running BigSur. Arduino version 1.18.19, Digispark ATtiny85 Micro USB.

Loaded Boards Manager http://digistump.com/package_digistump_index.json and updated all. Installed Windows Driver DPinst64 from digistump. Device Manager shows:

libusb-win32 USB Devices
Digispark Bootloader

This a first-time use of Digispark.

I have written a couple of successful programs for the ESP32 devkit v1.

Test Program
void setup() {                
  // initialize the digital pin as an output.
  pinMode(0, OUTPUT); //LED on Model B
  pinMode(1, OUTPUT); //LED on Model A   
}

// 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(5000); // wait for a second
  digitalWrite(0, LOW); // turn the LED off by making the voltage LOW
  digitalWrite(1, LOW); 
  delay(5000); // wait for a second
}

Compiles OK. Upload immediately goes to the following error: (with the Digispark not plugged in).

Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)
Assertion failed: res >= 4, file library/micronucleus_lib.c, line 100

I can find no relevant information on the error, I need help.

Greenonline
  • 3,152
  • 7
  • 36
  • 48
Dave
  • 51
  • 1

2 Answers2

-1

The device is only in bootload mode for a brief moment after power-up, therefore you have to unplug the device before hitting upload, and only connect it once it tells you to. This way the programmer can hit the bootloader in time to halt normal bootup, before execution is handed off to your code.

Literally stumbled over the same issue today, dunno why it won't just tell you this in the console right away.

ZleekWolf
  • 99
  • 2
-1

Agreed. Your answer is correct about cycling power. A more verbose explaination: Unplug the Arduino (or pull from USB). Then compile (ie: Right Arrow in IDE). On completion of compile the diag window will show "Running Digispark Uploader ..." At this time plug in (power ow) the Digispark. Then wait for a few seconds for it to download and then it should run automatically.