Nanode/Nanode the sequel

From Hackerspace Brussels
Jump to: navigation, search

Nanode/Nanode the sequel
Sat 12 May 2012 10:00
till Sun 13 May 2012 17:00
Nanode soldering
We will solder the batch of received Nanode boards. Program them and maybe play with it a bit... if they work.
HSB Brussels,Belgium
ptr jaroslov Netrunner

nanode workshop - the sequel

saturday 10h30 till sunday afternoon[edit]

before noon: prep[edit]

    • soldering your nanode : there are some nanode available at the hackerspace (at 31.41592EUR) , check with ptr_
    • do this soldering job preferably the day(s) before the workshop, so we can start doing some real work from the start of the workshop
    • installing the arduino v1.0 IDE + the EtherCard library
    • write a small firmware to your nanode (you'll need an ftdi cable for this, try to find one), test basic functionality

after noon[edit]

  • C introduction / refresher
    • variable types, program structure, arrays & pointers
    • serial input/output
    • a quick overview of arduino & ethercard libraries

  • basic networking 101 (ipv4)
    • an IP packet : headers & payloads
    • a big burito : ethernet / IP / TCP
    • shouting out loud in the (sub)net'hood : the LAN
    • your packet exploring the world : IP routing


  • parsing IP packets
    • protocol: how control exists after decentralisation;
    • don't let the RFC bite you
    • wireshark : checking the bits and byte'ing back



  • 10h30 till 14h : visit to the fleemarket, buy some crazy gear to play with


  • some practical applications
  • come over to work on yr project & get some advice

ethercard library

what's important :

  • the 'buffer' (enc28j60.h: static uint8_t ENC28J60::buffer[] ) : memory buffer where EtherCard::PacketReceive and EtherCard::PacketSend write/read from / within the library it's defined as gPB (the global packet buffer)
  • EtherCard::PacketReceive (enc28j60.h / enc28j60.cpp) : will write the received packet to the buffer
  • EtherCard::PacketSend (enc28j60.h / enc28j60.cpp) : will send the packet buffer onto the wire
  • EtherCard::packetLoop (tcpip.cpp) : handles ICMP responses & TCP handshakes

  what's in my IP packet - structure & parsing - wireshark to the rescue
  - make a small UDP server - using the lowlevel functionality of your hardware
  - do a tcp handshake : preserving state of a connection 
  (ipv4 only for now, will have a look at ipv6)
  HTTP 101 
  -  using web services (post your sensor data to a webserver)
  abusive DHCP client - make your network suffer a bit


  practical use of some environmental sensors to control & monitor 
  your mushroom-grow chamber
      Monitoring: Pachube/ sensors, Controling the enviroment with relays.
    sensors & dev : 
      * LDR:            100%
      * Thermistor:     100%
      * Hygrometer:    70% Frequency not well defined.

Relay box: 100% Your project in a PCB: 80%

Item's lists:

Nanodes Cables Leds Sensors LDR, Thermistors, Hygrometer Transistors Resistances Relays PCB/ Project boards BlackBoxes


   Wich library will be used



   TLDR: How to set up an scale. Home made calibration
   Hygrometer: Fix the frequency in order to get the right results.
   Set up the PCB final design (Fritzing :s ?).
  ***1 Proposed Initial code, incremental code (steps) & final code. 
   Call for buying missing Nanodes (also maybe to offer to sell the ones that people dont use)


 - hsbxl electronics lab
 - nanodes
 - soldering irons ftw
 - we need more 'ftdi' serial cables ! (probably Nico)

Known Issues:

   * Problem:UDP project was done with the new library. Pachube client works on the old one.

Solution 1: can do udp with anything, just need memory buffer of the packet. Solution 2: To fix the new library pachube problem (I have not documented the problem).

   * connecting an LCD screen is not possible due to lack of pins

Solution 1: Shift register (looks too complex)


LDR / Lux

New Library Ethercard Examples: Pachube, RestDuino, Ntp