You are on page 1of 18

Basic Arduino

Basic Arduino

2
Basic Arduino

3
Basic Arduino
What’s happening on pin 13 while the LED blinks.

Surface-Mounted Device(SMD)

4
What’s happening
on pin 13 while the
LED blinks.
Basic Arduino

5
Basic Arduino
Compiling and Uploading Programs

6
Basic Arduino
What’s happening on pin 13 while the LED blinks.

7
CoAP
o Constrained Application Protocol –CoAP
o IoT – Definition
o All about collecting data from various modules and to record it in cloud, analyze and act,
whenever needed.
o Many devices/equipment (Things) needs to be connected.
o This cannot be done light.
o Need protocols to come into picture.

o CoAP is one such protocol.


o Developed by IETF (Internet Engineering Task Force)
o Developed to enable smart devices to connect to the Internet.
o One to one communication protocol.
o Light weight protocol. ( Today, multiple constraints are there in the IoT environments,
because multiple THINGS
o It certainly uses lesser resources than HTTP and it is not a replacement of HTTP.

8
Contd.,
Remember this
 HTTP is very popular and has no constraints/ restrictions.
 CoAP is designed for the devices with Constraints.
 One should remember that HTTP runs over TCP.
 CoAP runs over UDP, not TCP.
 CoAP is based on ‘Client-Server model’.

9
Contd.,
 CoAP is based on REST( REST-Ful or SOAPFul)
 What is REST?
 Representational State Transfer.
 To ensure a secure, fault-tolerant and scalable system.
 CoAP provides support to optimize the datagram length.
 CoAP provides GET/PUT/DELETE method support.
 CoAP support Multicast.
 CoAP provides Retransmission support

10
Contd.,

 Two Layered
 Lower Layer  Message Layer
(with UDP)
 Upper Layer  Request/ Response

11
CoAP – Message Layer – Message Types
 Supports 4 types of messages  Confirmable (CON)-Reliable Message
 Confirmable (CON)  Retransmit – Until acknowledgement
 Non Confirmable ( NON) arrives with the same message ID.
 Acknowledge ( ACK)  Time out/ Recipient fail to process message
 Reset (RST) – will send RST with the response.

Client Server

CON (ADDR)

ACK (ADDR)

12
CoAP – Message Layer – Message Types
NON( This is unreliable)
No ACK
Message ID part of the transaction. This enable
supervising.
If no processing done by receiver, RST will be sent.

Client Server

NON (Message ID)

13
CoAP – Message Layer – Message Types
Piggy-backed: Client shall send request with a
CON/NON.
Ack shall be received immediately with corresponding
token number and message (Here, humidity). If not
available, the failure code shall be embedded as a part of
the ACK.

14
CoAP – Message Layer – Message Types
o Separate response – When a CON type message is sent to the server from
the client and in case, this server is unable to respond immediately, an
EMPYT ACK shall be reverted.
o After some time(not sure how much), when the server can send a CON
message with data.
o ACK shall be sent back from client.

15
CoAP – Message Layer – Message Types
o Non confirmable request and response.
o NON type message shall be sent from the client to the server.
o Server need not give ACK.
o Server can send a NON type response in turn.

16
CoAP – Message Layer – Message Types

17
CoAP – Message Layer – Message Types

18

You might also like