Sidebar

Table of Contents

Assignment Making the connections Programming the Boards Design Files




^
Home My Story



Networking and Communications

Connecting two boards



Assignment

- Design, build, and connect wired or wireless node(s) with network or bus addresses
- Send a message between two projects



Programming the Boards

For this week I have decided to try and get a communication between my electronics design project, and my Arduino, and then try to incorporate my game controller board from week 14. I started out by connecting my Arduino and my board with my ISP to Arduino cables, once I had them connected, I tested each with a simple blink code. This worked great, and then I tried uploading a simple code to the board. This did not work great.

For some reason my board would not want to work, I couldn’t figure out what pin was RX and which TX for the software serial, but I got something working. Then I look at the Serial monitor and there is just a long line of question marks flavored with the occasional Chinese character and apostrophe. Then I tried uploading, and it got stuck on one line of code while uploading, and I decided to just move on to the week 14 board and my computer.

The idea of this, is that you connect all the boards with a long FTDI cable, so they share the same input. (Since I don’t have that cable or the boards, I’m doing this with one board, but it’s very scalable). Each board has the same input, except for one difference, the ID. Each board has a specific ID, which is a number. The computer sends the ID over all the boards, but only the board with the same ID will put it into action. It’s like names for humans. That’s a serial bus.

So, I started out with connecting my board and checking if it works properly. There was a small bug where I was using old code that blinked with the ‘PB4’ pin, and as there is no such pin on the ATtiny1614, I was getting some issues. But after resolving this, I quickly got my code up and running. The board has the ID of 1 and checks the serial constantly if the data matches the ID, the board blinks twice, and then it waits for the next set of instructions. If I send any other number, such as 2, the board does nothing.



Design Files

Python code - Network code



@2021 | Fabián Finkbeiner Rivera's FabAcademy
Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)