The assignments for week 15 was to design and build a wired and/or wireless network connecting at least two processors
My plan was to make some serial boards communicate with each other, so i choose the hello.bridge and hello.node boards
Before i started i wanted to learn more about the subject so it would be easier for me to understand it
I knew i was going to let boards communicate with each other. I also knew that the hello.bridge "controls" the hello.nodes
This configuration is called Master/Slave configuration and sometimes referred to as Primary/Secondary configuration
If i had to describe this configuration in few words i would say this: One centralized "master" device (in my case the hello.bridge) handles all the logic and controls all of the "slave" devices (the hello.nodes)
A bridge is a device that performs Network bridging, which is the action taken by network equipment to create an aggregate network from either two or more communication networks, and or network segments
The definition of a node depends on the network and protocol layer referred to. A physical network node is an active electronic device that is attached to a network, and is capable of creating, receiving, or transmitting information over a communications channel
I did some reading on the OSI layers and learned that a layer serves the layer above it and is served by the layer below it. I won´t go into further details here but i found the picture below useful
I wanted to make serial boards so i chose the hello.bus.45.bridge and hello.bus.45.node
All the files can be found on the Fab Academy archive
The cutting of the boards was very successful
Instructions on cutting out boards using the modela can be found in week 4
I also cut out a plexi glass plate to put the boards on, which i made in inkscape
This is what the boards looked like after the cutting and soldering
To see if the board would work correctly i connected it to an AVRISP
The AVR gives you a green light if the board is working properly and luckily that was the case with my board!
For the programming of the board i decided to use linux enviroment
I saved the c file and the makefile into a folder on the desktop
I needed to give each board a number. To do so i had to edit the c file everytime i programmed every board
I opened the terminal, found the folder and wrote: gedit hello.bus.45.c
Now a text editor opened and i had to change the node_id value
I named the bridge 0 and the nodes 1 and 2
Now i had to send the program to the board and run the makefile
To do so i wrote: sudo make -f hello.bus.45.make program-avrisp2
If you're using an FabISP instead of AVR microcontroller write: sudo make -f hello.bus.45.make program-usbtiny
This message should come up if the programming is successful. That was the case with all my boards
The nodes were connected to the bridge and the bridge was connected to the computer through a ftdi cable
My next step was to run the python file
The serial port i was using is called ttyUSB0
Now i ran the python file by writing: python term.py /dev/ttyUSB0 9600
This window came up and if i pressed 0,1 or 2 on the keyboard the led blinked on each board and the message: node 0,1 or 2 came up in the
0 was the bridge and the nodes were 1 and 2 as i mentioned earlier
Here are the boards in action