Projects with the GEMMA microcontroller

19th January, from the backup vaults of David Whale’s email inbox…

A couple of months ago I mentioned Trinket, which is a broken out ATTIny85 microcontroller with mini USB support for £7. A very similar board is the GEMMA, which are produced by the same company (Adafruit) but made with wearable tech in mind, so therefore the pads are bigger and the holes are big enough to fit a needle through.

I originally bought 3 GEMMAs and two Trinkets (1 3.3v and 1 5v) and thought I’d managed to break most of them as the information on the right way to set everything up is err…scattered. As a calmer-downer to anyone else struggling: Most of your problems will be how your environment(laptop) is set up, and if you don’t have a windows PC…then well…you probably won’t have much issue.

The projects so far

My main project I wanted to make initially were the earrings Becky Stern did as a wearable tutorial:

I then modded them to have pacman themed animations:

<iframe src=”; height=”315″ width=”420″ allowfullscreen=”” frameborder=”0″ align=”center”

This is pretty simple (but pricey) as they were simply a gemma, neopixel ring, battery, 3 short wires and a couple of earring hangers, and the code is reasonably simple to look through so I fiddled a bit. I don’t like the ghost themed anim so I’m going to try and improve that, but if anyone wants my anim code let me know 😉

Secondarily I got another gemma for Babbage:


Babbage is the raspberry pi bear, so a teady bear with a tee with the pi logo. HE SO CUTEEEEE. Anyway I got this guy from the Pimoroni Adopt a Reject program (*which doesn’t actually exist*) because whilst visiting with Sven Nuttall who’s also a pi nerd and also from Sheffield, we noticed there was a reject basket holding 3 Babbages which were “rejects” as the quality came out a bit…weird.

Anyway, I decided he needed a wearable stuck to his shirt, but unfortunately erm…


I burned it…

Yeah. I’m probably going to have to redo the whole thing and rethink it. The idea is to make him my compass, so if I’m travelling north the top LED will light up etc as there’s a small compass & accelerometer in the shirt as well, although there’s as yet no code for GEMMA and that sensor…

Problems setting up

Aside from the issue I had trying to set up arduino on my surface, there’s several things that caused me to struggle. First I’ll go over what errors I got:

no device connected or some equivalent – means you’re not in the bootloader. Keep the button pressed down until about a second before the arduino IDE hits “Upload”.

Device does not recognise the command, content mismatch, device malfunctioned: problem with your avrdude.conf file, or the avrdude.exe file. Note that on a windows PC this will probably make your GEMMA’s bootloader light pulse for 10 seconds, stop and do another “Unplugged” noise but still have the light lit, and then repeatedly do the same process again and again. Don’t panic. It’ll get fixed the next time you program it correctly.

bootloader light just comes on, but not brightly and doesn’t pulse You’re screwed. Well…I think. I’ve just hit this with one of my GEMMAs and it no longer shows up as being plugged in…so erm…yeah…I think this may need a reprogram – to fix this you have to follow the adafruit repair the bootloader tutorial.

Tips for getting past them

If your error is in the second grouping above (command not recognised etc), then first off, try the avrdude method (link to tutorial here). This reassured me my gemma actually worked and was pretty quick.

Then, I personally went through and deleted everything (winAVR, arduino downloads, drivers, avrdude copies) and started over – downloaded the Adafruit package of Arduino (link), redownloaded winAVR and checked what I needed to change. This forum post was really helpful – I downloaded the trinket zip attatched, copied the avrdude.conf inside the arduino IDE (err…arduino/windows/hardware/tools/avr/etc/avrdude.conf) into the system wide location (for me that was C:/WinAVRfoldername/bin), copied the avrdude exe file from the download and placed it in the hardware location for avrdude (don’t remember that off the top of my head), modified the avrdude.conf ATTiny85 speed to 40000 (for the exact location of the line inside avrdude.conf see the forum post link)  pressed upload on my sketch and…it worked!


I’m next planning on testing the signed driver for win8 so hopefully on my train to Hull next weekend I can do some on the go programming…


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s