15. Networking and communications¶
individual assignment:
design, build, and connect wired or wireless node(s)
with network or bus addresses
group assignment:
send a message between two projects
Individual Assignment¶
For this week, I connected the LED Board I created in output devices as a slave to a newly fabricated master board under the RS-232 Serial Data Standard. My master board simply had an ATTiny412 on it and four pins that held Ground, VCC, RX, and TX. Here is the board and schematic:
This is the finished product after soldering:
For my LED Boards, I used the FTDI pins as these boards were not originally created to be slave boards. Without a ribbon cable, I simply used jumper wires along wtih a through hole straight pin header to split the connection. I only had to do this once to split the connection between the two slave boards. Here is what one of the jumper wires looked like:
I created four of these for their respective pins. The final setup looked like this:
To test out my master board, I coded it to sequentially write into serial which LED and board it wanted to light up starting from the first LED on the first board to the last LED on the last board. Here is the code I uploaded to my master board:
#define F_CPU 20000000
void setup() {
Serial.begin(115200);
}
void loop() {
for (int i = 1; i < 3; i++) {
for (int j = 0; j < 5; j++) {
Serial.print(itoa(i, cstr, 10));
Serial.print(":");
Serial.print(itoa(j, cstr, 10));
Serial.println(":255:0:0");
delay(100);
}
}
Serial.println("1:100:0:0:0");
delay(100);
Serial.println("2:100:0:0:0");
delay(100);
}
Here is a video of it working:
Here are the files for this week: download
With the techniques I learned in this week, I can apply this to create a master board to control my slaves which will be a motor controller, LED blades, and hall effect sensor. Having a master board is very crucial to my project and I have learned a great amount from this week.
Group Project¶
The group assignment can be found here.