I encountered some challenges getting up and running with my Digispark ATTINY85 Micro USB dev board on Fedora 35, so I thought I would document it before I forget. The board was a few dollars and similar to this one:
https://www.amazon.com/Digispark-Kickstarter-ATTINY85-Arduino-Development/dp/B01MQOPY5C
The problems I encountered:
- The board uses the micronucleus bootloader https://github.com/micronucleus/micronucleus, which frees up pin 6 (
RESET
) for use but means I can't use the usual serial programmer. The instructions are for the Arduino IDE. - Arduino IDE no longer has a package maintainer on Fedora 35, so I couldn't install from the official repositories. It's available as a snap or flatpak, but I would prefer to install from the website.
To install the Arduino IDE:
- Download the official Linux build from the website and unpack it.
- Running the
install.sh
script, I encountered these errors:
[sss_cache] [sysdb_domain_cache_connect] (0x0010): DB version too old [0.22], expected [0.23] for domain implicit_files!
- After some Googling, I determined that I probably don't need
sssd
at all, so I uninstalled it. The following instructions might also work for you:
systemctl stop sssd
rm -rf /var/lib/sss/db/*
systemctl restart sssd
I recently did a dist upgrade of Fedora from 33 to 35, so this problem may well have stemmed from that. Either way, I was able to clear that error.
Next, I ran into a problem with a mismatch of certain Java dependencies (gtk
, for example) and the version of Java that's shipped with the Arduino IDE. This manifested as missing menu text and similar graphical glitches. To resolve, I did this:
sudo dnf install java-latest-openjdk
sudo alternatives --config java # select the number with java-latest-openjdk.x86_64
mv java{,_old}
I followed the instructions for setup, including the Linux instructions.
http://digistump.com/wiki/digispark/tutorials/connecting
Added this to Additional Boards Manager URLs in the Arduino IDE:
http://digistump.com/package_digistump_index.json
Installed the Digistump AVR Boards and selected the Default 16.5 mhz Board.
Added the udev
rules, and reloaded: udevadm control --reload-rules
# UDEV Rules for Micronucleus boards including the Digispark.
# This file must be placed at:
#
# /etc/udev/rules.d/49-micronucleus.rules (preferred location)
# or
# /lib/udev/rules.d/49-micronucleus.rules (req'd on some broken systems)
#
# After this file is copied, physically unplug and reconnect the board.
#
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"
#
# If you share your linux system with other users, or just don't like the
# idea of write permission for everybody, you can replace MODE:="0666" with
# OWNER:="yourusername" to create the device owned by you, or with
# GROUP:="somegroupname" and mange access using standard unix groups.
It took me a few tries to figure out the trick to getting these things to program. The instructions on the site did tell me, I just didn't catch on right away.
The Digispark works a bit differently than some Arduino compatible products. The Digispark programs with a different procedure. From the Tools menu select Board→Digispark (Default - 16.5Mhz) (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 before invoking upload. Hit the upload button. The bottom status box will now ask you to plug in your Digispark - at this point you need to plug it in - or unplug and replug it.
You'll see the upload progress and then it will immediately run your code on the Digispark.
If you unplug the Digispark 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.
Basically, upload your sketch then plug in the Digispark. I found that I also had to repeat this process for each load, which is a bit of a pain.