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.jpg
What:
Nanode soldering
Tagline:
We will solder the batch of received Nanode boards. Program them and maybe play with it a bit... if they work.
Where:
HSB Brussels,Belgium
Cost:
0
Who:
ptr jaroslov Netrunner pas.for.tech.suport
URL:


nanode workshop - the sequel



saturday 10h30 till sunday afternoon

before noon: prep

    • 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

  • 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

evening

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


sunday

prenoon

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

afternoon

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

ethercard library https://github.com/jcw/ethercard

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




saturday-evening:

  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

TO DECIDE:

   Wich library will be used

TO DO:

Software:

   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)


Hardware

 - 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)




Links

LDR / Lux http://www.engineeringtoolbox.com/light-level-rooms-d_708.html http://en.wikipedia.org/wiki/Photoresistor http://embedded-lab.com/blog/?p=4330 http://www.farnell.com/datasheets/56196.pdf http://dangerousprototypes.com/2012/01/20/digital-light-intensity-meter-with-a-calibrated-ldr/


New Library Ethercard Examples: Pachube, RestDuino, Ntp https://github.com/thiseldo/EtherCardExamples