COMP600 Spring Lab#1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

COMP 600

Emerging Wireless Technologies

Lab 1: Arduino Discovery lab

Objectives:
 To be familiar with Arduino as IDE, programming language and platform.
 To provide knowledge of Arduino boards and basic components in order to be ready for
implementing and solving real world examples.

Hint: Use the template at D2L Resources to build up your report.


Tasks:
1. Please work in a group of 4 students as a maximum – you can have less members or work
individually; Please register to your group at D2L; go to communication  Groups  then
view the members and join to your preferred group.
2. Build up a report using the Lab Report Template at D2L  Resources; the report should
contain the following:
A. Introduce Arduino board.
B. Research about Arduino in terms of the following:
 Types (choose any 3 including Arduino Mega 2560 )
 Arduino GPIO interface of Arduino Mega 2560 (show the details using description
and a diagram)
 Specifications
 Cost (for each type)
 IDE, & Programming language
 Applications
C. Discussion questions:
a) What is the Baud rate?
The term Baud rate means at what speed the data is transferred between one
Arduino board to another device. It is measured in bps (bits per second). Also, it is
mandatory that the baud rate settings of both the Arduino and the device match,
otherwise, the data may not be transmitted or received correctly.

b) Compare Serial and Parallel communication?


Serial Communication Parallel Communication
1. The data is transmitted one bit 1. In this, multiple bits are
at a time (sequentially) over a transmitted (simultaneously)
channel. over multiple channels.
2. It has slower data transfers. 2. It has a faster data transfer
3. It is used for long-distance rate.
communication as it requires 3. It is used where high-speed
few wires. Moreover, more data transfer is required within

Page 1 of 3
COMP 600
Emerging Wireless Technologies

resistant to signal degradation a short distance like


over long distances. computer’s motherboard.
4. Examples- RS-232, I2C, SPI and
many more. 4. Examples- Parallel ATA for
connecting hard drives, printer
ports and many more.

c) List and explain the function of SPI & Wi-Fi Arduino libraries.
1. SPI library- It is also known as the Serial Peripheral Interface library used for
communicating with devices that support the SPI protocol. It allows Arduino
boards to act both as master and slave devices in communication. It is used
between microcontrollers and peripheral devices such as sensors, displays and
memory chips.
Functions of SPI library-
 SPI.begin() - Used for initializing the SPI communication and setting the
input/output pins appropriately.
 SPI.beginTransaction() – Used for an SPI transaction by setting the
desired clock divider, data, and data mode.
 SPI.transfer() – To simultaneously send and receive the data over the
SPI bus.
 SPI.endTransactions()- It ends the current SPI transactions.
 SPI.end()- Disables the SPI communication and releases the associated
pins.
2. Wi-fi library- It is used for connecting two wireless networks and
communicating over Wi-Fi.
Functions of wi-fi library-
 WiFi.begin() - To initialize the Wi-Fi connection and attempt to connect
to a particular network using credentials.
 WiFi.disconnect() – To disconnect from the currently connected Wi-Fi
network.
 WiFi.status- Return to the current Wi-Fi status connection.
 WiFi.localIP()- Return to the IP address assigned to the Arduino board
on the local network.
 WiFi.scanNetworks() – I will scan for the available Wi-Fi network and
return information such as network name (SSID) and signal strength.
 WiFiClient AND WiFiServer – It allows the creation of TCP/IP client and
server connections for sending/receiving data over the network.

Page 2 of 3
COMP 600
Emerging Wireless Technologies

Assessment Criteria:
Refer to the Lab Report template at D2L  Resources.

Submission Guidelines:

 Go to D2L and answer ActivityLab#1 related question during the lab duration as per your
schedule.
 Due Date: refer to D2L. (Please submit the labs on time since no extensions; Zero
Tolerance).
 Only one submission per group is required and it can be done by any group member.
 Submission Method: Dropbox folder ONLY.

Page 3 of 3

You might also like