This is an old revision of the document!
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.5.x with some custom additions. These will be integrated with the DigiX and Original Digispark additions and released as a package - but for the beta release please follow the instructions below.
First download the appropriate packages:
Open 'System Preferences'
Select 'Security and Privacy' from your 'System Preference' window
Make sure you are in under the 'General' view in 'Security and Privacy'
Unlock the edit icon in the lower left hand (this will require that you have an account that allows you to modify these setting.)
You will know you are successful because the icon in the lower right side of the dialog will be unlocked
Ensure that you have enabled non-Store apps under System Preferences
You can now download and unzip to a folder - hint if you use Safari it will complete the unzip for you.
Use or install as you would any other App. If you need assistance please check the Apple site for further help - 'http://support.apple.com/kb/PH11356'.
Why do I have to unlock my security to install the Digispark editing application? Is this safe?
Apple has a developer policy that requires developers to choose to work inside or outside of its application ecology. Developers who work inside of the ecology register with Apple and pay licensing fees. Apple then applies criteria from its application store policy to the app. Apple does not block users from installing apps built outside of it ecology, but it requires users to accept that these apps are not Apples responsibility - http://support.apple.com/kb/ht5290
Currently the Digispark development tool was created outside of this ecology and is likely to stay this way. It is opensource.While the developers have not built this app under the supervision of Apple they have signed this. When the application is launched you can go to the Arduino menu and select 'about Arduino' where the developers have made a public who they are and what code they have modified.
See the troubleshooting section below for any other issues.
Make sure you installed lib32stdc. by issuing: apt-get install lib32stdc++6
Unzip to a folder.
Before plugging in the Digispark or running the Arduino IDE you must install the driver.
To install the driver go into the folder you just unzipped and go to the “Digispark - Windows Driver” folder. Inside that folder run the InstallDriver executable file. Go through the wizard to install the Digispark driver.
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 (see below for the difference between the two Digispark option, but either will do for getting started)
From the Tools menu select Programmer→Digispark Pro
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.
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