Brighton Mini Maker Faire

Maker Faire came to Brighton!

Spent a very happy hour marvelling at all the amazing things people had made. Awesome 🙂

Loads more pics and videos here: makerfairebrighton.tumblr.com

2 thoughts on “Brighton Mini Maker Faire

  1. I cant get my Nanode to get an IP address.
    I get ENC28J60 Version 7 when running the DHCP test, but th eethernet lights dont come on (although they do flash three times when I reset the Nanode).
    Any ideas ?

    • Did you remember to add “, 8” when initialising the ethernet library?
      I forgot to do that at first and I think that’s what happened to me too…

      Instructions here: http://wiki.london.hackspace.org.uk/view/Nanode_Applications#Before_You_Start

      edit: actually, looks like that says “version 0”, not “version 7”.
      This code worked for me…

      /*
      * Arduino ENC28J60 Ethernet shield/Nanode DHCP client test
      */

      #include "EtherShield.h"
      #include "NanodeMAC.h"

      static uint8_t mymac[6] = { 0x54,0x55,0x58,0x12,0x34,0x56 };

      static uint8_t myip[4] = { 0,0,0,0 };
      static uint8_t mynetmask[4] = { 0,0,0,0 };

      // IP address of the host being queried to contact (IP of the first portion of the URL):
      static uint8_t websrvip[4] = { 0, 0, 0, 0 };

      // Default gateway. The ip address of your DSL router. It can be set to the same as
      // websrvip the case where there is no default GW to access the
      // web server (=web server is on the same lan as this host)
      static uint8_t gwip[4] = { 0,0,0,0};

      static uint8_t dnsip[4] = { 0,0,0,0 };
      static uint8_t dhcpsvrip[4] = { 0,0,0,0 };

      #define DHCPLED 6

      // listen port for tcp/www:
      #define MYWWWPORT 80

      #define BUFFER_SIZE 750
      static uint8_t buf[BUFFER_SIZE+1];

      EtherShield es=EtherShield();
      NanodeMAC mac( mymac );

      // Programmable delay for flashing LED
      uint16_t delayRate = 0;

      void setup() {

      Serial.begin(19200);
      Serial.println("DHCP Client test");
      pinMode( DHCPLED, OUTPUT);
      digitalWrite( DHCPLED, HIGH); // Turn it off

      for( int i=0; i<6; i++ ) {
      Serial.print( mymac[i], HEX );
      Serial.print( i < 5 ? ":" : "" ); } Serial.println(); // Initialise SPI interface es.ES_enc28j60SpiInit(); // initialize enc28j60 Serial.println("Init ENC28J60"); es.ES_enc28j60Init(mymac,8); Serial.println("Init done"); Serial.print( "ENC28J60 version " ); Serial.println( es.ES_enc28j60Revision(), HEX); if( es.ES_enc28j60Revision() <= 0 ) { Serial.println( "Failed to access ENC28J60"); while(1); // Just loop here } Serial.println("Requesting IP Addresse"); // Get IP Address details if( es.allocateIPAddress(buf, BUFFER_SIZE, mymac, 80, myip, mynetmask, gwip, dhcpsvrip, dnsip ) > 0 ) {
      // Display the results:
      Serial.print( "My IP: " );
      printIP( myip );
      Serial.println();

      Serial.print( "Netmask: " );
      printIP( mynetmask );
      Serial.println();

      Serial.print( "DNS IP: " );
      printIP( dnsip );
      Serial.println();

      Serial.print( "GW IP: " );
      printIP( gwip );
      Serial.println();

      digitalWrite( DHCPLED, HIGH);
      delayRate = 1000;
      } else {
      Serial.println("Failed to get IP address");
      delayRate = 200;
      }

      }

      // Output a ip address from buffer
      void printIP( uint8_t *buf ) {
      for( int i = 0; i < 4; i++ ) { Serial.print( buf[i], DEC ); if( i<3 ) Serial.print( "." ); } } void loop(){ digitalWrite( DHCPLED, HIGH); delay(delayRate); digitalWrite(DHCPLED, LOW); delay(delayRate); }

      I have since switched to using EtherCard instead of EtherShield, and that made things a fair bit easier.

Leave a Reply