top of page
i2c-bus-logo-black-and-white.png

Recent Posts

What is i2c?

i2c is a serial communication protocol, which was invented in 1982 by Philips Semiconductor. It uses the Serial Data (SDA), which is the line for the master and slave to send and receive data. The Serial clock (SCL) is the line that carries the clock signal. 

How do they work?

The i2c bus are either master or slave devices. These devices can reach up to 128 using the same bus, so they can be either multiple master devices or multiple slave devices. The master devices drives the Serial clock signal (SCL), while the slave devices respond to the master. The i2c uses addressing for the master and the slave to communicate to one another.

Introduction-to-I2C-Single-Master-Single-Slave.png

Figure 1: Diagram of Master & Slave

Example's schematic

Figure 2 shows the schematic of two Arduino Nanos, one circuit representing the Master while the other represents the Slave.

Figure 2: Schematic

How The Code Works

The video below shows how the code operates. The Master code reads the value of the potentiometer, maps the potentiometer values to the LED values (from 0 to 255), and sends the values to the Slave code, which is then sent over to the LED in order to adjust its brightness.

Transmitter Code

Receiver Code

Figure 3: How the codes are behaving

Video That I've Used

bottom of page