14. NETWORKING AND COMMUNICATIONS¶
REDESIGN¶
I redesigned the files for asynchronous communication.
First I downloaded the png files, milled the board and soldered the components. I build 1 bridge and 2 nodes. The result is shown:
Origin
My design: in the FTDI pins the traces are too close so I used a cutter to separate both parts.
Origin
My design in EAGLE
You can download the files by clicking on the bullet.
SOLDERING¶
Board
I soldered the boards
PROGRAMMING¶
I was guided of the repository, click here
The difference between both devices is only at the add-on of the FTDI pins. Inside the hello.bus.45.c file is a code line saying “#define node_id ‘0’“. If the number is change by other variable char we can personalize each device. In my case I put 0,1 and 2.
I put the numer 0 in the serial communication, but i didn’t succeed due to a fault in the board because of the connection of the cable ftdi.
You can download the files by clicking on the bullet.
PROBLEM OCURRED¶
It was possible to record the programming on the boards but at the time of sending the serial communication it did not send due to a problem of bad contact or not continuity in the traces, so I opted to make another plate
I2C Language¶
I used my Fabduino FABKIT 2.0 board and a board of the same type, to make these two connect using I2C language.
The I2C language protocol will be used in which two controllers (fabduino) The main idea is abstracted in the right image. The slave will send a numbers between 0 and 127 when the master request communication, it will get the value to transform in angle of servomotor. The slave address is 8 and send one byte. This idea become real when I connect two fabduinos through SDA/SCL pins. In master board connects a servomotor. The next images show this hardware implementation. Additionally, we connect fabduino with FTDI wire and USBasp programmer. The power supply is the same for boths kits.
The fabduinos manufactured in the Final project ,I will be used it
Master code¶
Slave code¶
I burned each board with the programmer USBasp
You can download the files by clicking on the bullet.