Week13- Networking and Communications

Introduction

Sometimes we don't know where to start and gets stuck. This week is like that for me. But then I got a trick, I recommend you all to check the pages of previous years student's pages. Some students really write good notes and links the references they used. I personally prefer referring Francisco, Quentin, Zina, Adrian and many others. After referring their pages, I know where to start and then I youtube a lot of tutorials on the week's topic.

Assignment

individual assignment:

group assignment:

Group assignment

The group assignment is here

Lecture notes


Inter-integrated circuit, I2C

Communication

Individual assignment

For this week's assignment, we have to connect wired or wireless node(s) with network or bus addresses.

Wireless connection:

I am using esp32 module for the final project and so this week I wanted to explore more about ESP32 microcontrollers and how to communicate. I have started with my final project board and rectified as I went along, thats why I have 2 esp32 boards which I will be using here to communicate with one another.

image

Prerequisites

  1. ESP32 add-on Arduino IDE. Instructions are here

  2. Parts required. Make sure you have 2 esp32 boards ready. I milled my board during the output week

    image

1. Getting mac address

image

image

ESP32 board A- sender board - MAC address= C4:4F:33:68:E3:59 - {0xC4, 0x4F, 0x33, 0x68, 0xE3, 0x59} ESP32 board B- Receiver board - MAC address= A8:03:2A:18:CA:40 - {0xA8, 0x03, 0x2A, 0x18, 0xCA, 0x40}

2. One-way communication

  1. Program the ESP32 board A(sender) first, putting the mac address of ESP32 board B(receiver) in the program to which the values will be sent

    image

  2. Program the ESP32 board B(receiver) then to receive the values.

    image

  3. Switch to run-mode in board the ESP32 boards to run the program.

    image

3. Two-way communication

  1. Program the ESP32 board A- putting the mac address of ESP32 board B to which data is being sent.

    Image

  2. Program the ESP32 board B- putting the mac address of ESP32 board A to which data is being sent as it is a 2way communication now

    image

  3. Switch to run-mode and press the reset button on both the ESP32 boards to run the program.

The programming files

  1. Getting the mac address
  2. One-way communication boardA- sender
  3. One-way communication boardB- receiver
  4. Two-way communication boardA
  5. Two-way communication boardB