Week 16 - Networking and Communications
In this week I want to build a network with at least two microcontroller chips and communicate with them. I decided to make the serial bus with two board and one bridge.
Making the boards
The milling and soldering was pretty staright forward. I used Neil's designs for the bridge (bridge traces and bridge outline) and for the two nodes (node traces and node traces). The boards are all the same, except the FTDI conncetion on the bridge.
Programming and communicating
The next thing was to program the boards with Neil's
code and letting them talk to each other.
For finding out, what baud rate I am having, I use pyserial. python -m serial.tools.miniterm
.
The port name is in my case again /dev/ttyUSB0
since I am using Ubuntu.
The next is to start term.py to communicate with the board-network. I am using
python term.py /dev/ttyUSB0 9600
in a command shell.
In my first attempt they just blink, when I type any character in term.py.
My mistake, I forgot to rename the boards id #define node_id '0'
in the code. Ok, rewrite, make and upload again.
I named my boards 0,1 and 2. When I type one of those characters in term.py, the specific board responds by
blinking twice.
My first serial or more accurate, bus, communication!