Using the Sparkfun Tiny AVR Programmer in Ubuntu 20.04

Because I use a lot the ATTiny85 for my projects (as last example see the Soundmeter) I need a programmer. I could use an arduino, or an bus pirate of course as I have done a lot under Ubuntu 18.04. But I had a few bucks left and decided to use the Sparkfun Tiny AVR Programmer for that job now. No more fiddling with a breadboard with faulty contacts or ancient, greek style fight with an gorgon like adapter cable of the bus pirate.

The sparkfun programmmer need some adjustments to your linux box, but not much. I got this good, straight forward description from Michel Deslierres. It works also for Ubuntu 20.04 as in the original description for Ubuntu 18.04. You can follow this descriptions. But as a personal note & HowTo:

As root (with plugged in programmer):

$ lsusb
...
Bus 002 Device 025: ID 1781:0c9f Multiple Vendors USBtiny
...

OK, the device works, Ubuntu recognize it. Now the udev rule, via nano editor:

$ cd /etc/udev/rules.d/
$ sudo nano 99-USBtiny.rules

The rule itself, I already put it to the “dialout” group as the most used standard for this use case (group should exist…)

SUBSYSTEM=="usb", ATTR{idVendor}=="1781", ATTR{idProduct}=="0c9f", GROUP="dialout", MODE="0666"

Save the rule, plug out (if not done yet) the device and restart the udev service:

$ sudo service udev restart 
$ sudo udevadm control --reload-rules

and the final check after plugin the programmer:

$ ls -l /dev/bus/usb/002/025
crw-rw-rw- 1 root dialout 189, 152 Okt 23 20:17 /dev/bus/usb/002/025

looks good and – if not already done –  add the user using the Arduino IDE to the “dialout” Group, should be done after installing Arduino IDE. Important: Restart your computer after.

$ sudo adduser $user dialout

Now it works, even if the “Port” setting in the Arduino IDE is grayed out. As Example with the Cherryplexing Code from the Soundmeter Project. Output of the IDE:

Screenshot Arduino IDE Settings for Sparkfun Programmer

Compile your sketch and load it up (don’t forget to plug in an ATTiny into the programmer 😉 ). The LED of the programmer should flash, the output in the IDE should look like that:

Programming an ATTiny85 with Sparkfun Programmer - Upload ok

Congrats, you have done it. So, have fun with your new programmer and now you can focus to your electronic projects, not how to load the program into the ATTiny with Ubuntu 20.04.