The bootloader is the code that is pre-programmed on your Digispark and allows it to act as a USB device so that it can be programmed by the Arduino IDE.
The Digispark runs the micronucleus bootloader version 2, an open source project https://github.com/micronucleus.
CAUTION We are not at this point supporting upgrading the firmware, so if you decide to, you do so entirely at your own risk.
The Digispark Pro uses the Arduino IDE 1.6.5+ (Arduino 1.6.5r2 - NOT 1.6.6 or 1.6.7 strongly recommended)
http://digistump.com/package_digistump_index.json
and click OK
Note: If you already have additional URLs entered in that box, then click the button on the right of the box and enter this URL on a new line.
Digistump Package Sources: https://github.com/digistump/DigistumpArduino
The Digispark (and Pro) works a bit differently than some Arduino compatible products. Not only is there a special add-on to the IDE to support it, but it also programs with a different procedure.
From the Tools menu select Board→Digispark Pro (16Mhz) (Default)
(The Tools→Programmer selection does not matter)
Write some code, open your code, or open a Digispark example.
You do not need to plug in your Digispark Pro before invoking upload
Hit the upload button. The bottom status box will now ask you to plug in your Digispark Pro - at this point you need to hit the reset button on it or plug it in.
You'll see the upload progress and then it will immediately run your code on the Digispark Pro.
If you unplug the Digispark Pro and plug it back in or attach it to another power source there will be a delay of 5 seconds before the code you programmed will run. This 5 second delay is the Digispark Pro checking to see if you are trying to program it. After the 5 second delay when the bootloader launches the stored program, the USB device will typically go away (and may report a failure to install, or “Unknown Device”) unless the nature of the 'sketch' is to act as a USB device.
If you're just getting started try the above procedure with the following example
Here is the code it will load:
// the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(1, OUTPUT); //on board LED } // the loop routine runs over and over again forever: void loop() { digitalWrite(1, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(1, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
This code will blink the BUILT IN LED on Pin 1
As soon as it has uploaded you should see the LED start to blink!
The Digispark Pro, due to its small size and low cost is not as robust as a full blown Arduino.
The Digispark Pro does not have reverse polarity protection. Connecting power to the Digispark Pro power pins backwards will almost certainly destroy it.
The Digispark Pro does have a 0.5A fuse for both the USB and VIN lines - this should safeguard it from brief shorts - but is not by any means a failsafe.
The Digispark Pro is small enough to present a choking hazard and small enough to be inserted into some sockets. We take no responsibility for misuse of the product. Please treat electricity and electronics with respect and common sense.
The Digispark Pro pushes affordable, small components to their limits by using software to emulate USB functions generally served by a dedicated chip. For this reason much of the Digispark's USB operation is considered borderline out of spec. Certain laptops, older machines, and just some cheaply made USB hubs/controllers do not like this. We tested and designed the Digispark Pro for maximum compatibility but we can not guarantee it will work with everything.
In addition remember the Digispark Pro only shows up as a programmable device for 5 seconds, after that it will start running its code (when it is new and un-programmed this means it will blink) and disappear or act like the USB device you programmed it to act like.
Always remember plug in or restart the Digispark Pro when the Arduino IDE requests you to.
If the computer will not recognize the Digispark Pro try the following:
If it won't upload:
Did you set your board AND programmer to Digispark in the Arduino IDE?
WINDOWS:
MAC
LINUX: See the Linux troubleshooting page
If your upload fails in the middle of it, you may also be using a bad USB cord and or a bad hub.
Support requests are best posted to the forum, so everyone can benefit and we can help eachother through any issues - http://digistump.com/board