This week assignment is about Networking and Communication. A network consist of two or more devices that are linked transmitting and/or receiving data between them. For this week I chose to work with the hello.bus boards just to understand a bit more of networking.
Materials:
Hello bus Bridge Board
As much as Hello bus Node boards
FTDI Cable or FTDI board
A computer with either Arduino or with Neil term.py program
Programming the boards:
For programming the board you need the C and makefile. Connect the boards as shown in the pictures below. Open the C file and look on line 41 for the definition node_id, when programming the board this is going to be the board identifier and it will respond against a serial port incoming data. For example you may tag your bridge board with an node_id equal to 3, so everytime it reads this value through serial it will answer flashing a LED in the board and sending data to the terminal. You can even make a servo board and use this same mehtod so when it receives the identifier and some extra packed data it turns a certain ammount of degrees.
Use the following command in Terminal app for programming the board:
sudo make -f hello.bus.45.make program-usbtiny
Do the same for the node boards, and make sure you change the node_id definition to something else. If you want to use the code as it is then make sure your node_id value has the size of a Byte, this means it ranges from 0 to 255. Once every board is programmed unplug the ISP and open either Arduino serial monitor or Neil term.py and make sure the baudrate is 9600.
In the serial monitor you may write your node_id and the corresponding board must answer flashing the leds twice, the others just flash one time, if you want to deactivate this flash then go to your code and delete line 217 (the first call to flash() function), then only the corresponding board will flash it's LED.