⚠️ If You Don't Read Anything Else, Read This:
Digisparks program differently than all other Arduino boards. With a regular Arduino, you plug the board in first, then upload. With the Digispark, you click Upload first, then plug the board in when prompted. This is because the Micronucleus bootloader only listens for new code for about 5 seconds after the board is powered on. If the board is already plugged in when you click Upload, the upload will fail. See the section "Programming Your Digispark — The Upload Process" below for more details.
💡 Overview
The Digispark ATtiny85 is a tiny, Arduino-compatible development board built around the Microchip (formerly Atmel) ATtiny85 microcontroller. Despite being smaller than a quarter, it packs enough capability to handle a surprising range of projects — from blinking LEDs and reading sensors to acting as a USB keyboard or mouse.
Originally developed by Digistump (now defunct), the Digispark has become one of the most popular microcontroller boards for compact, embedded projects. It features a built-in USB bootloader called Micronucleus, which lets you program it directly from the Arduino IDE without needing a separate programmer. Just plug it in, upload your code, and you're running.
This guide covers both versions of the Digispark ATtiny85 board available from Envistia Mall:
- Digispark ATtiny85 (USB-A) — The classic design with a built-in USB-A plug that connects directly to your computer's USB port.
- Digispark ATtiny85 (USB-C) — A modern revision that replaces the built-in USB-A plug with a standard USB-C connector, making it easier and more convenient to connect using a standard USB-C cable.
Both boards are functionally identical — they use the same ATtiny85 chip, the same bootloader, the same pin layout, and are programmed the same way. The only difference is how they physically connect to your computer. The USB-C version is especially convenient since most modern computers and laptops now feature USB-C ports.
Note: The original Digistump company and their website (digistump.com) are no longer operational. This guide provides updated instructions using currently available resources for board support and drivers.
⚖️ USB-A vs. USB-C — Which Version Do I Have?
| Feature | Digispark USB-A | Digispark USB-C |
|---|---|---|
| USB Connector | Built-in USB-A plug (part of the PCB) | USB-C port on the board |
| Connection Method | Plugs directly into a USB-A port | Uses a standard USB-C cable |
| Board Dimensions | Approx. 25 × 18 mm (0.98 × 0.71 inches) | Approx. 24 × 18 mm (0.95 × 0.71 inches) |
| Microcontroller | ATtiny85 | ATtiny85 |
| Bootloader | Micronucleus | Micronucleus |
| Pin Layout | Identical | Identical |
| Programming | Identical | Identical |
Everything in this guide applies equally to both versions unless specifically noted.
📋 Specifications
| Parameter | Value |
|---|---|
| Microcontroller | Microchip ATtiny85 |
| Architecture | 8-bit AVR |
| Clock Speed | 16.5 MHz (internal PLL, tuned by bootloader) |
| Flash Memory | 8 KB (approximately 6 KB available after bootloader) |
| SRAM | 512 bytes |
| EEPROM | 512 bytes |
| Digital I/O Pins | 6 (P0–P5) |
| PWM Outputs | 3 (P0, P1, P4) |
| Analog Input Channels | 4 (P2, P3, P4, P5) |
| Operating Voltage | 5V |
| Input Voltage (via USB) | 5V |
| Input Voltage (via VIN pin) | 7–12V (regulated on-board) |
| Max Current per I/O Pin | 40 mA |
| USB Interface | Software-based USB 1.1 (Low Speed) |
| Bootloader | Micronucleus (V-USB based) |
| On-Board LED | Yes — connected to P1 |
| On-Board Voltage Regulator | Yes — 5V |
| Board Dimensions (USB-A) | Approx. 25 × 18 mm (0.98 × 0.71 inches) |
| Board Dimensions (USB-C) | Approx. 24 × 18 mm (0.95 × 0.71 inches) |
📌 Pin Configuration
The Digispark ATtiny85 has 6 I/O pins (P0 through P5). Each pin can serve multiple functions, but some have special roles you should be aware of:
| Pin | Digital I/O | PWM | Analog In | Special Function | Notes |
|---|---|---|---|---|---|
| P0 | Yes | Yes | No | SDA (I2C Data), MOSI (SPI) | Also used for USB D- (shared) |
| P1 | Yes | Yes | No | MISO (SPI) | On-board LED connected here |
| P2 | Yes | No | A1 | SCL (I2C Clock), SCK (SPI) | Also used for USB D+ (shared) |
| P3 | Yes | No | A3 | USB D+ (when USB active) | Avoid using during USB communication |
| P4 | Yes | Yes | A2 | — | Safest general-purpose pin |
| P5 | Yes | No | A0 | RESET | Used as Reset by default — can be reconfigured as I/O by changing fuses, but this disables further programming via USB |
Important: Pins P3 and P4 are connected to USB data lines through 68Ω resistors and are used during USB communication. P3 and P4 are the safest pins for general-purpose use when your project doesn't need USB after programming. If you need I2C, use P0 (SDA) and P2 (SCL). The on-board LED on P1 will light up whenever P1 is HIGH, which can be useful for debugging but may interfere if you need P1 for other purposes.
💻 Setting Up the Arduino IDE
The Digispark is programmed using the Arduino IDE with special board support files. Follow these steps carefully to get everything set up.
Step 1: Install the Arduino IDE
If you don't already have the Arduino IDE installed:
- Go to https://www.arduino.cc/en/software
- Download the latest version of the Arduino IDE for your operating system (Windows, macOS, or Linux).
- Install it using the default settings.
- Launch the Arduino IDE once installation is complete.
Step 2: Add the Digistump Board Manager URL
The Digispark boards aren't included in the Arduino IDE by default. You need to add a special URL so the IDE knows where to find the Digispark board support files.
Note: The original Digistump website (digistump.com) is no longer operational. The board manager package is now hosted on GitHub at the URL shown below. This is the same official Digistump package, just served from an alternate location.
- Open the Arduino IDE.
- Go to File > Preferences (on macOS: Arduino IDE > Preferences).
- Find the field labeled "Additional boards manager URLs" near the bottom of the Preferences window.
- Paste the following URL into that field:
https://raw.githubusercontent.com/digistump/arduino-boards-index/master/package_digistump_index.json
- If you already have other URLs in that field, click the icon to the right of the field to open the URL list, and add this URL on a new line.
- Click OK to save your preferences.
Step 3: Install the Digistump AVR Boards Package
- Go to Tools > Board > Boards Manager (or click the Boards Manager icon in the left sidebar in IDE 2.x).
- In the search box, type digistump.
- You should see "Digistump AVR Boards" appear in the results.
- Click Install.
- Wait for the installation to complete. This will download the board definitions, the Micronucleus upload tool, and (on Windows) may prompt you to install USB drivers.
Step 4: Select the Digispark Board
- Go to Tools > Board.
- Scroll down to the Digistump AVR Boards section.
- Select "Digispark (Default - 16.5mhz)".
This is the correct board selection for both the USB-A and USB-C versions of the Digispark.
🔧 Installing USB Drivers (Windows)
Windows users need to install USB drivers for the Digispark to be recognized by your computer. macOS and Linux users can typically skip this step, as the drivers are usually built in.
Automatic Driver Installation
When you install the Digistump AVR Boards package (Step 3 above), the Arduino IDE may automatically prompt you to install the drivers. If it does, follow the on-screen prompts and allow the installation to complete.
Manual Driver Installation
If the drivers were not installed automatically, or if your computer doesn't recognize the Digispark when you plug it in:
- Navigate to your Arduino installation's Digistump package folder. The typical path is:
C:\Users\[YourUsername]\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.0a4\
- Look for a file or folder related to drivers (such as DPinst.exe or a drivers folder).
- Run the driver installer and follow the prompts.
- Alternatively, you can download the drivers directly from the archived Digistump GitHub repository: Digistump Drivers (GitHub Archive)
- Extract the ZIP file and run DPinst.exe (32-bit) or DPinst64.exe (64-bit) depending on your system.
Tip: If Windows still doesn't recognize the board, try a different USB port. Some USB 3.0 ports can be finicky with the Digispark's low-speed USB. A USB 2.0 port or a USB hub often works more reliably.
🚀 Programming Your Digispark — The Upload Process
Programming the Digispark is a little different from programming a standard Arduino board. The most important thing to understand is the upload sequence:
Key Difference: With a regular Arduino, you plug the board in first, then upload. With the Digispark, you click Upload first, then plug the board in when prompted. This is because the Micronucleus bootloader only listens for new code for about 5 seconds after the board is powered on.
The Digispark Upload Sequence
- Do NOT plug in your Digispark yet.
- Write or open your sketch in the Arduino IDE.
- Make sure Tools > Board is set to "Digispark (Default - 16.5mhz)".
- Click the Upload button (or press Ctrl+U / Cmd+U).
- The IDE will compile your sketch. When compilation is complete, you'll see a message in the output window that says:
Running Digispark Uploader... Plug in device now... (will timeout in 60 seconds)
- Now plug in your Digispark to a USB port.
- The upload will begin automatically. You'll see progress messages, and when it's done:
>> Micronucleus done. Thank you!
- Your sketch is now running on the Digispark!
USB-C Version: Connect your Digispark to your computer using a USB-C cable. Make sure you're using a data-capable USB-C cable, not a charge-only cable.
USB-A Version: Plug the board directly into a USB-A port on your computer. If your computer only has USB-C ports, use a USB-C to USB-A adapter or hub.
🚀 Step 1: Blink — Your First Digispark Sketch
Let's start with the classic Blink sketch to verify everything is working. The Digispark has a built-in LED connected to pin P1, so we can blink it without any additional wiring.
Blink Code
/*
* Digispark Blink
* Envistia Mall - Product Support
*
* Blinks the on-board LED connected to P1.
* This is the simplest test to verify your
* Digispark is programmed and working correctly.
*/
void setup() {
pinMode(1, OUTPUT); // P1 = on-board LED
}
void loop() {
digitalWrite(1, HIGH); // LED on
delay(1000); // Wait 1 second
digitalWrite(1, LOW); // LED off
delay(1000); // Wait 1 second
}
Upload Steps
- Copy and paste the code above into the Arduino IDE.
- Make sure your board is set to Digispark (Default - 16.5mhz).
- Make sure your Digispark is NOT plugged in.
- Click Upload.
- Wait for the "Plug in device now..." message.
- Plug in your Digispark.
- The on-board LED should start blinking once per second after the upload completes.
Note: The LED may flash briefly during the bootloader phase (first ~5 seconds after plugging in). This is normal — it's the bootloader checking for new code. Your sketch starts running after the bootloader times out.
🚀 Step 2: Fading LED — Using PWM
This example demonstrates PWM (Pulse Width Modulation) output to smoothly fade the on-board LED. Pin P1 supports PWM, so no additional components are needed.
Fading LED Code
/*
* Digispark Fading LED
* Envistia Mall - Product Support
*
* Smoothly fades the on-board LED on P1
* using PWM (analogWrite).
*
* Demonstrates PWM output capability
* of the ATtiny85.
*/
int brightness = 0;
int fadeAmount = 5;
void setup() {
pinMode(1, OUTPUT); // P1 = on-board LED (PWM capable)
}
void loop() {
analogWrite(1, brightness);
brightness = brightness + fadeAmount;
// Reverse direction at the ends
if (brightness <= 0 || brightness >= 255) {
fadeAmount = -fadeAmount;
}
delay(30); // Controls fade speed
}
Upload Steps
- Copy and paste the code above into the Arduino IDE.
- Follow the same upload sequence: click Upload first, then plug in when prompted.
- The on-board LED should smoothly fade in and out.
🚀 Step 3: Reading an Analog Sensor
This example shows how to read an analog sensor (such as a potentiometer or photoresistor) and use the reading to control the LED brightness. Since the Digispark doesn't have a hardware serial port for the Serial Monitor, we'll use the LED as a visual output instead.
📦 Additional Parts Needed
- Potentiometer (any value from 1KΩ to 100KΩ) or photoresistor with a 10KΩ resistor
- Breadboard and jumper wires
Wiring
| Component | Digispark Pin |
|---|---|
| Potentiometer center wiper | P2 (Analog A1) |
| Potentiometer one outer leg | 5V |
| Potentiometer other outer leg | GND |
Analog Sensor Code
/*
* Digispark Analog Read + LED Control
* Envistia Mall - Product Support
*
* Reads a potentiometer on P2 (A1) and
* uses the value to control LED brightness
* on P1 via PWM.
*
* Connections:
* Pot center wiper -> P2
* Pot outer legs -> 5V and GND
*/
void setup() {
pinMode(1, OUTPUT); // P1 = LED output (PWM)
}
void loop() {
int sensorValue = analogRead(A1); // Read P2
// Map 0-1023 range to 0-255 for PWM
int ledBrightness = sensorValue / 4;
analogWrite(1, ledBrightness);
delay(10);
}
🛠️ Troubleshooting
| Problem | Possible Cause | Solution |
|---|---|---|
| Board not recognized by computer | Missing USB drivers (Windows) | Install the Digistump drivers manually — see the driver installation section above. Try running DPinst64.exe as Administrator. |
| "Plug in device now..." but upload fails | Board was plugged in too early or too late | Unplug the board, click Upload, wait for the prompt message, then plug in within a few seconds. |
| Upload times out after 60 seconds | Driver issue or defective USB cable | Try a different USB port (preferably USB 2.0). For the USB-C version, make sure you're using a data-capable cable, not a charge-only cable. |
| "Device not found" error | USB 3.0 compatibility issue | Use a USB 2.0 port or connect through a USB 2.0 hub. Some USB 3.0 controllers have timing issues with low-speed USB devices. |
| Sketch compiles but doesn't seem to run | Bootloader delay | The Micronucleus bootloader runs for about 5 seconds after power-on before your sketch starts. Wait a few seconds after plugging in. |
| "Digispark" not appearing in Boards Manager | Board manager URL not added correctly | Go to File > Preferences and verify the Digistump JSON URL is entered correctly. Check for typos or extra spaces. |
| Board manager URL download fails | Original Digistump server may be down | The URL may intermittently work. See the alternative URL above. |
| Sketch too large to upload | ATtiny85 has limited flash memory | The ATtiny85 has only ~6 KB available for your sketch (after the bootloader). Simplify your code, remove unused libraries, and use byte instead of int where possible. |
| LED on P1 is always on or flickering | P1 is shared with the on-board LED | If you're using P1 for something other than the LED, the on-board LED will respond to that signal. Use a different pin if this is a problem. |
| I2C or SPI not working | Pin conflict with USB | P0 and P2 are used for I2C but are also shared with USB data lines. USB communication will be disrupted when using I2C. This is normal — the board switches to your sketch after the bootloader phase. |
💡 Tips for Best Results
- Always unplug before uploading — The Digispark's upload process requires you to plug in the board after clicking Upload. This is the #1 source of confusion for new users.
- Use USB 2.0 ports when possible — The Digispark uses low-speed USB 1.1, which can have compatibility issues with some USB 3.0 controllers. A USB 2.0 port or hub is more reliable.
-
Keep sketches small — With only ~6 KB of usable flash, every byte counts. Avoid large libraries designed for full-size Arduinos. Use
byteinstead ofintfor small values, and useF()macro for string literals where supported. - Use P4 as your go-to pin — P4 is the most versatile pin with the fewest conflicts. It supports digital I/O, PWM, and analog input without interfering with USB, I2C, or the on-board LED.
- Mind the 5-second bootloader delay — Your sketch doesn't start running immediately when you plug in the board. The bootloader waits about 5 seconds for a possible upload before handing control to your sketch. Plan for this in time-sensitive applications.
- Don't reconfigure P5 (Reset) as I/O — While it's technically possible to change the fuses to use P5 as a regular I/O pin, doing so permanently disables USB programming. You would need a high-voltage programmer to recover the board.
- Use a data-capable USB-C cable — If you have the USB-C version, make sure your cable supports data transfer. Some inexpensive USB-C cables are charge-only and won't work for programming.
- Power considerations — The Digispark can be powered via USB (5V) or through the VIN pin (7–12V, regulated on-board). Don't apply more than 12V to VIN, and don't power from both USB and VIN simultaneously unless you know what you're doing.
⚠️ Important Notes
-
No Serial Monitor: The ATtiny85 does not have a hardware UART, so the standard Arduino Serial Monitor does not work with the Digispark. For debugging, use the on-board LED, external LEDs, or a software-based serial library like
SoftSerial(though this uses precious flash memory). - Limited Memory: With 512 bytes of SRAM and ~6 KB of usable flash, the Digispark is not suitable for complex projects that require large libraries, extensive string handling, or multiple simultaneous peripherals.
- USB Pin Sharing: Pins P3 and P4 are shared with the USB data lines. After the bootloader hands off to your sketch, these pins are available for general use, but they cannot be used for USB communication at the same time as your sketch's I/O.
- 3.3V Logic: The ATtiny85 runs at 5V on the Digispark. If you're interfacing with 3.3V devices (like many modern sensors), you may need a level shifter to avoid damaging the 3.3V device.
- Clock Accuracy: The Digispark uses the ATtiny85's internal oscillator tuned to 16.5 MHz by the bootloader. This is less accurate than an external crystal, so timing-critical applications (like precise serial communication) may experience drift.
- Digistump Website: The original developer, Digistump, has gone out of business and their website is no longer operational. The board support files are still available through the Arduino Board Manager URL listed in this guide, and drivers can be downloaded from the archived GitHub repository.
🏪 Where to Buy
The Digispark ATtiny85 Development Boards are available at Envistia Mall in both USB-A and USB-C versions.
Buy the Digispark ATtiny85 Classic (USB-A) Development Board →
Buy the Digispark ATtiny85 USB-C Development Board →
- 📦 Fast Free US Shipping
- 🔄 Hassle-Free Returns
- 📧 Responsive Customer Support
📚 Additional Resources
- ATTinyCore by SpenceKonde — Alternative/advanced board support for ATtiny microcontrollers
- Micronucleus Bootloader — The USB bootloader used on the Digispark
- Digistump Arduino (GitHub Archive) — Archived board support files and drivers from the original developer
- ATtiny85 Datasheet — Official Microchip documentation for the ATtiny85 microcontroller
- Digispark ATtiny85 Rev 3 Schematic (PDF)
-
VIDEO: How To Program A Digispark (ATTINY85) from Simple Electronics on YouTube
-
VIDEO: Installing Drivers and Programming the DigiSpark ATtiny85 dev boards – Tutorial from Brainy-Bits on Youtube
This user guide is provided by Envistia Mall for informational and educational purposes. While we strive for accuracy, specifications and procedures may change over time. Always refer to the latest manufacturer documentation for critical applications. Envistia Mall is not responsible for any damages resulting from the use or misuse of this information.