Week 14 Networking and Communications

Assignments:

Group assignment:

    • Send a message between two projects.

Individual assignment:

    • design, build, and connect wired or wireless node(s) with network or bus addresses.

Learning outcomes:

    • Demonstrate workflows used in network design.
    • Implement and interpret networking protocols and/or communication protocols.

Weekly Assignmnets

Group Assignmnet

For our group assignment we tried both UART and I2C protocols. We used 2 attiny 1614 boards for connections and for UART serial communication TX and RX pins were used and for I2C SDA and SCL pins were used. both were identified from 1614 datasheet, and burned on it simple LED on/off code by Arduino IDE.
Above video displays UART protocol communication, below displays I2C protocol.

UART-Arduino files I2C-Arduino files

Individual Assignmnet

As for my individual assignment I used 2 attiny 1614 boards (fabricated in week8 with GPIOs ) for UART serial communication bus.
So I started with writing the code which I had got help from my colleagues (thanks to them) I finally made the correct corrections and the code started working fine.
As mentioned below in challenges section I wanted to connect both of them and start UART communication protocol 2 ways but still could not manage to make it work properly.
So that is why I satisfied with the assignment helped by others to meet the deadline.

Arduino file

It is very similar to UART code between the 2 boards but the difference here is they are both slaves waiting for the data I write in the Serial Monitor, if the data sent is the ID number of a board it turns the led on and send data to Serial monitor then turns the led off. It was mainly 1 code but changing the ID number from each board.
Note To be able to use 2 boards as slaves in the UART communication technique we had to make the TX pin as input when it wasn't sending data to make sure that no noise is happening or 2 boards are sending data in the same time. Plus, that was the exact same reason there are no else in the code, as both boards will send data at the same time if they weren't chosen.
Here is the code

Arduino file

Voila its done

To sum up, I completed the following:

    • √ Linked to the group assignment page.
    • √ Document your project.
    • √ Documented what you have learned from implementing networking and/or communication protocols.
    • √ Explain the programming process/es you used.
    • √ Outlined problems and how you fixed them.
    • √ Included design files (or linked to where they are located if you are using a board you have designed and fabricated earlier) and original code.

#Challenges 1

I wanted to try 2 way communication UART protocol but only worked one way. The image of the code is given below.

#Solution 1

it might be faulty wiring but still will try again.

image

Aknowledgment