From London Hackspace Wiki
Jump to navigation Jump to search

Testing Nanode

The ATmega328 microcontroller supplied with the kit has a specially modified version of the Arduino bootloader pre-programmed into it.

Arduino usually has a LED wired to Digital pin 13, but in Nanode, digital 13 is in almost constant use as the SPI Clock.

So in the Nanode bootloader, the LED flashing function has been altered so that it flashes the red LED which is wired to digital pin 6.

If all is well with your Nanode board, the Red LED should start flashing about 2 seconds after the power (from USB or FTDI cable) has been applied.

If it does not flash, check for faults such as missing soldered joints or the LED incorrectly inserted.


Quick Tutorial- 4/6/11.

1. Download Arduino Environment

2. Download FTDI Cable Drivers Plug in the FTDI programming cable.

  • Windows users: When prompted to install drivers, point the installer to the arduino-0022/drivers directory
  • Mac users: mount the arduino installation dmg and double click on the FTDI install package at the bottom of the window.

3. Download EtherShield Libraries

Download here:

  • Change the downloaded folder name to "EtherShield" and place in Arduino/libraries/ folder
  • Mac users: make a folder called "libraries" in Documents\Arduino\ then place the EtherShield folder into the newly created libraries folder.
  • Windows users: place the EtherShield folder into arduino-0022\libraries\
  • Linux users: place the EtherShield folder into arduino-0022\libraries\

4. Run the EtherShield_DHCPTest

Arduino: File > Examples > EtherShield_DHCPTest

4.1 In the source code, change MAC address to something random :) e.g. change the last two digits "??" to the two digit number written in pen on the bottom of your Nanode:

 static uint8_t mymac[6] = {0x54,0x55,0x58,0x5F,0x01,0x??};

4.2 On line 57, change es.ES_enc28j60Init(mymac); to es.ES_enc28j60Init(mymac,8);

EtherShield Library and Examples

First you need to download and install the EtherShield library from GitHub

Make sure you have Arduino 0021 or better still 0022 installed.

(Remove any previous version of Ethershield library - as this causes code compilation problems).


To get the EtherShield examples to work you will have to edit the enc28j60 init function to read.


In the webserver example this can be found on line 48.