Let us start with a recap

In the previous days we saw...

...methods to work with digital signals...
e.g. digitalWrite, digitalRead

...and methods to work with analog signals
e.g. analogRead

We can already notice one big absent in the list above, can you see it?

Arduino UNO does not have a DAC*

*Digital to Analog Converter
which is an electrical system that allows us
to generate analog signals

You can figure it out by checking the Arduino UNO R3 datasheet

analogWrite function is the biggest Arduino scam!

But, if I need a DAC in my project
do I have to drop my Arduino UNO R3?

no

We can include an external component in our circuit
which will carry out the missing role...

...in the same way we previously
introduced LEDs in our circuits

An external DAC can be bought for a few euros
e.g. DAC MCP4921

Still a problem...

...how can we "communicate" with it?

We need a communication protocol

A communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity
~from wikipedia, "communication protocol" page

Slide for pro users

If you have confidence with the concept of communication protocol you probably know the OSI model

# Layer Function
Host layers 7 Application High-level APIs, including resource sharing, remote file access
6 Presentation Translation of data between a networking service and an application; including character encoding, data compression and encryption/decryption
5 Session Managing communication sessions, i.e., continuous exchange of information in the form of multiple back-and-forth transmissions between two nodes
4 Transport Reliable transmission of data segments between points on a network, including segmentation, acknowledgement and multiplexing
Media layers 3 Network Structuring and managing a multi-node network, including addressing, routing and traffic control
2 Data link Transmission of data frames between two nodes connected by a physical layer
1 Physical Transmission and reception of raw bit streams over a physical medium

Luckily, with a few low level protocols we can communicate with more or less any commercial "chip" or "board"

Also Arduino UNO R3
(or better its core ATMEGA328P)
supports some of them

Did we previously use any of those protocols?