The Digispark is basically an ATtiny85 running the Micronucleus bootloader. Here's how to build one yourself on a breadboard. This certainly doesn't look at good and definitely isn't as small as a real Digispark, but it can shorten the wait until you get your board.
Note that this is not the official circuitry (which I did not find online despite the board being advertised as "open hardware"), but from what I can see it's reasonably compatible.
CAUTION: While this works for me, I do not guarantee that it might work for anyone else. I assume no responsibity for any damage this might cause. Use on your own risk. Do not build this if you do not understand the circuitry.
Materials needed:
* 1 ATtiny85-20PU
* 1 Breadboard (could be saved if this is built on a PCB)
* 1 3.3V LDO voltage regulator, e.g., MCP1702
* 1 10 uF elko for the voltage regulator - it doesn't work otherwise
* 2 68R resistors
* 1 2.2K resistor
* 1 USB connector (could be saved if this is built on a PCB)
Schematic:
The entire MCU is powered at 3.3V obtained from a LDO regulator (I used a MCP1702 together with a 10 uF elko between its GND and OUT). ATtiny Pin 7 = D+, Pin 6 = D-. These must be connected to the MCU using 68R resistors. D- must additionally be "pulled high" though a 2.2K resistor (on the USB side, not on the MCU side of the 68R resistor).
First, flash the Micronucleus bootloader into the ATtiny and set the fuses (I used a USBasp):
wget
https://raw.github.com/Bluebie/micronucleus-t85/master/firmware/releases/micronucleus-1.04.hex./avrdude -C ./avrdude.conf -v -v -v -v -pattiny85 -cusbasp -Pusb -U flash:w:micronucleus-1.04.hex:i
./avrdude -C ./avrdude.conf -v -v -v -v -pattiny85 -cusbasp -Pusb -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xfe:m
Now we should see the device show up in lsusb/dmesg as idVendor=16d0, idProduct=0753
At this point, we can use the micronucleus command line tool to upload Firmware
sudo ./micronucleus micronucleus-t85-master/commandline/cdc232.hex
Believe it or not, this now shows up as a serial adaptor in dmesg:
[13563.472052] cdc_acm 1-2.3:1.0: >ttyACM0: USB ACM device
To get rid of having to use sudo, do
sudo su
cat > /etc/udev/rules.d/49-micronucleus.rules <
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
EOF
service udev restart
exit
Then install the Digispark Arduino integration. Since I use Ubuntu I had to compile some parts by hand:
sudo apt-get -y install g++ libusb-dev
wget
https://github.com/digistump/avr-dummy/archive/master.zipunzip master.zip
cd avr-dummy-master/
make
strip avrdude
cd ..
rm master.zip
wget
https://github.com/Bluebie/micronucleus-t85/archive/master.zipunzip master.zip
cd micronucleus-t85-master/commandline
make
strip micronucleus
Within the Arduino directory do the following as per the instructions in the Wiki:
* Go to hardware/tools
* Rename avrdude to avrdude_original
* Copy the avrdude executable compiled above into the directory
* Copy the micronucleus executable compiled above into the directory
Now you should have your own breadboard Digispark :-)