Category menu

Getting a Nerdkit to work with the Raspberry Pi

Most of the things I do on a day to day basis are in relation to building websites and looking at ways to code interesting online actions – one thing I’m interested in however is the idea of the internet of things – smart, connected objects that bridge the gap between the online and actual world. Perhaps one day I’ll even find an ecampaigning application for this.

I just had a go connecting up a Nerdkit with the Raspberry Pi. Nerdkits are similar in some ways to the Arduino boards, although they’re a bit more hands on. Whereas the Arduino is nicely assembled and can be just plugged into a USB port, the Nerdkit comes as a pile of parts, a bit of breadboard and some instructions. What’s exciting about Nerdkits, Arduinos and microcontrollers (MCUs) in general is that they provide a flexible, re-programmable set of ‘brains’ with lots of interesting uses. Think of them as lego for electronics.

The ultra cheap Raspberry Pi makes a nice partner to the Nerdkit, as I’m still slightly nervous about attaching something I’ve put together myself to my shiny Mac. Along with the instructions come a set of makefiles which you compile and upload to the MCU via the USB to serial adapter.

The  Nerdkit is based around an Atmel AVR ATmega168 microcontroller which has it’s own bootloader. Also included are the crystal, various resistors, voltage regulators and a variety of input sensors and output electronics. Putting the whole thing together is very satisfying and has given me a bit more insight into how microcontroller based kits work (and what all the bits on the Arduino board do). One really nice additional feature of the Nerdkit is the lcd display panel, which provides feedback in the form of messages, poetry or temperature readouts – depending on what you program it to do. The example below shows it running as a thermometer (one of the included tutorials). Mounting the whole thing on a bit of board is highly recommended.

Photo of Nerdkit mounted on a board with a Raspberry Pi

Here’s my Nerdkit mounted on a board (an Ikea shelf panel) with power switch

Installing the software as in the user guide works fine -it’s all done in the command line, so there’s no Java based application to worry about –

sudo apt-get install avrdude
sudo apt-get install gcc-avr
sudo apt-get install avr-libc

You can edit the makefiles using Leafpad which is part of the default Raspbian operating system. Connecting the Nerdkit cable to the Pi’s USB port presented no problems either.

I did however run into a small snag – although programs would compile and upload successfully, the display on the Nerdkit was showing just on the top line:

Garbled text display

Not quite working

 A quick hunt through the forums later and I came across the fix – open the Makefile (in the example above it’s the one in the tempsensor directory and the one in the libnerdkit directory), look for the GCCFLAGS line and change the “-Os” flag to “-O0” (letter O, number 0). Then delete the .hex and .o files in both the directory your Makefile is in and the libnerdkit directory. That last bit is vital, I kept missing it.

Then it should work fine:

Normal nerdkit display

Working as it should. It was slightly chilly.

So there you go – my first steps in getting my Raspberry Pi to do a bit more than web surfing. I thought I’d highlight that the Raspberry Pi and Nerdkit work together happily, in case anyone else wants to try it out.


4 Responses to Getting a Nerdkit to work with the Raspberry Pi

  1. Education Reform (@Educ_Reform) March 28, 2013 at 6:23 pm #

    Pete – Nerdkits are US products- can you buy them in the UK?

  2. Brian E April 3, 2013 at 2:49 am #

    Great article man. I just ordered a NerdKit based on it! Are you just using the Pi to read any of the values generated from the NerdKit, or just to compile the NerdKit’s (firmware?)?

  3. Eric November 20, 2015 at 4:52 am #

    Thank you, thank you, Thank You!! This was driving me insane! The RPi works quite well as a “wireless” programmer. I suppose I was looking in the wrong spot, as I thought the LCD glitch had to do with my not using the PL-2303 or the NerdKits bootloader anymore. If you haven’t tried using the RPi’s SPI as a programmer, you might find it cleans up your board nicely…


  1. Raspberry Pi Arduino 8x8 LED Matrix - October 20, 2012

    […] step is to prepare the Arduino with the code you need it to run. Unlike the Nerdkit microcontroller I mentioned in a previous post the Arduino has a nice user friendly graphical front end – the […]

Leave a Reply