Wired or wireless networks are useful to orchestrate architectures of electronics. This week we learn to talk between devices, connecting at least two processors (with a wired or wireless connection). I will follow Neil´s designs (see on lecture page) and make the serial asynch hello.bus.45.bridge and two hello.bus.45.nodes to blink some LEDs at the end of the day.
* Neil´s lecture video and page
* As I am catching up, the documentation of my fellow fab collegues Joao, and Edgaar were super helpful, thx guys! From former years: Fran´s and Ferdi´s pages
* Integrating Technology blog by a former fab academy student
* And yes, Asynchronous Serial Communication on wikipedia
Straight forward, done after the example given by Neil in Eagle. Here are the components lists for Bridge and Nodes 1 & 2:
By now also more or less straight forward. I used fabmodules to control the Roland nilling machine.
The C file "hello.bus.45.c" and .make file have to be downloaded into the same folder. I then used terminal to upload the code. First I programmed the bridge, then node 1, then node 2. Connect the bridge board on one side to the FTDI and on the other to the FabISP or AVRISP and program it, next you connect node 1, and at last node 2.
To program, navigate in terminal to your folder (mine is named "code"). On the C file you need to change the #define node_id '0' for each node. I defined the bridge or master board as: #define node_id '0', the first node: #define node_id '1' and the second node: #define node_id '2'. I then ran the following command: "sudo make -f hello.bus.45.make program-avrisp2".
I got an error message when programming the bridge, which was solved with resoldering the AtTiny45 on the bridge. Next I programmed the two nodes by changing the adressing number in the c file from 0 to 1 (for node 1) and from 1 to 2 (for node 2). I also got an error when programming node2, which was also fixed by resoldering the AtTiny45.
To make your boards react - blink - open the Arduino IDE and click on the Serial Monitor. In the Serial Monitor window you can type 0, 1 or 2 (or whichever number you chose to adress your boards) and press enter after. This results in the boards reacting: The selected board will blink twice. You can also follow the response in the serial monitor window.
Networking & Communication from Norma D. on Vimeo.