SlideShare a Scribd company logo
1 of 12
Download to read offline
I2C COMMUNICATION
BETWEEN NODEMCU AND
ARDUINOWITH DHT11
KUNTALA DAS
7/20/2020 @KUNTALADAS
NodeMCU I2C with Arduino IDE
 Introduction
 I2C (Inter-Integrated Circuit) is serial bus interface connection protocol. It is also
called as TWI (two wire interface) since it uses only two wires for
communication. Those two wires are SDA (serial data) and SCL (serial clock).
 I2C is acknowledgment based communication protocol i.e. transmitter checks
for an acknowledgment from the receiver after transmitting data to know
whether data is received by receiver successfully.
 I2Cworks in two modes namely,
 Master mode
 Slave mode
 SDA (serial data) wire is used for data exchange in between master and slave
device. SCL (serial clock) is used for the synchronous clock in between master
and slave device.
 Master device initiates communication with a slave device. Master device
requires slave device address to initiate conversation with a slave device. Slave
device responds to master device when it is addressed by a master device.
 NodeMCU has I2C functionality support on its GPIO pins. Due to internal
functionality on ESP-12E, we cannot use all its GPIOs for I2C functionality. So,
do tests before using any GPIO for I2C applications.
7/20/2020 @KUNTALADAS
NodeMCU I2C with Arduino IDE
 Here, we are using
 Master Device: NodeMCU
 Slave Device: Arduino Uno
 Slave Device Address: 8
 Interfacing diagram is shown in below figure
7/20/2020 @KUNTALADAS
DHT11
7/20/2020 @KUNTALADAS
ARDUINO
7/20/2020 @KUNTALADAS
NODEMCU
7/20/2020 @KUNTALADAS
CONNECTION BETWEEN NODE
MCU AND ARDUINO
 Master Device: NodeMCU
 Slave Device: Arduino Uno
 Slave Device Address: 8
7/20/2020 @KUNTALADAS
I2C Communications (Wire)
 This is an I2C communications library that facilitates two-
wire class communications with I2C/TWI devices (also
called "Wire Library"). The pull-up to communication lines
are needed. With a total of 8 serial channels available.
You cannot use slave device. The followings describe
channels corresponding to pins and can confirmed using
the pin map. To use, specify #include <wire.h>.
 Wire: A5(SCL), A4(SDA)
Wire1: 0(SCL), 1(SDA)
Wire2: 7(SCL), 6(SDA)
Wire3: 26(SCL), 24(SDA)
Wire4: 5(SCL), 3(SDA)
Wire5: 8(SCL), 9(SDA)
Wire6: 11(SCL), 12(SDA)
Wire7: 60(SCL), 58(SDA)
7/20/2020 @KUNTALADAS
I2C Communications (Wire)
 I2C functions for Arduino
 Wire.write (data)
 It is used to write (transmit) data to the master or slave device.
 Parameter
 data it can be single byte value, string, array of data.
 Returns
 No. of bytes written.
 e.g. Wire.write(7); //send data byte
 Wire.write(“i2c”); //send string to slave device
 Wire.write(a, 6); //here a is an array
 Wire.available()
 This function is used by a master or slave to check the requested data is available or
not. It returns the no. of bytes available.
 Wire.read()
 It is used to read the requested data by master from slave or read the data transmitted
from a master to a slave.
7/20/2020 @KUNTALADAS
I2C Communications (Wire)
 Functions for Arduino I2C Master
 Note: Every I2C slave device has unique address. While communicating
using I2C protocol, this slave address needs to be used by Master.
 Arduino has Wire Library which allows us to communicate with I2C devices.
 Wire.begin ()
 It initiates the Wire library and joins the bus as a master.
 Wire.beginTransmission (slave address)
 This function begins a transmission with the I2C slave device having
specified slave address.
 slave address 7-bit address of device with which we want to
communicate.
 e.g. Wire.beginTransmission (50) //begin transmission with slave having
address 50
 Wire. requestFrom(address, no of byte) OR
 Wire. requestFrom(address, no of byte, stop)
 This function is used by master to request or receive data from slave device.
The requested data can be read by using Wire.read().
7/20/2020 @KUNTALADAS
MY CONNECTIONWITH DHT11 NODEMCU
AND ARDUINO UNO
7/20/2020 @KUNTALADAS
MY CONNECTIONWITH DHT11 NODEMCU
AND ARDUINO UNO
7/20/2020 @KUNTALADAS

More Related Content

Similar to I2 c communication between nodemcu and aeduino with dht11 (1)

An Implementation of I2C Slave Interface using Verilog HDL
An Implementation of I2C Slave Interface using Verilog HDLAn Implementation of I2C Slave Interface using Verilog HDL
An Implementation of I2C Slave Interface using Verilog HDLIJMER
 
I2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoI2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoMike Ochtman
 
Internet of things laboratory
Internet of things laboratoryInternet of things laboratory
Internet of things laboratorySoumee Maschatak
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATIONsoma saikiran
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentFastBit Embedded Brain Academy
 
communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemsRaghunath reddy
 
Please in your own words describe SPI, I2C, and UART with the follow.pdf
Please in your own words describe SPI, I2C, and UART with the follow.pdfPlease in your own words describe SPI, I2C, and UART with the follow.pdf
Please in your own words describe SPI, I2C, and UART with the follow.pdfflashfashioncasualwe
 
INT4073 L07(Sensors and AcutTORS).pdf
INT4073 L07(Sensors and AcutTORS).pdfINT4073 L07(Sensors and AcutTORS).pdf
INT4073 L07(Sensors and AcutTORS).pdfMSingh88
 
Implementation of I2C Master Bus Protocol on FPGA
Implementation of I2C Master Bus Protocol on FPGAImplementation of I2C Master Bus Protocol on FPGA
Implementation of I2C Master Bus Protocol on FPGAIJERA Editor
 
Fpga implementation of multi protocol data
Fpga implementation of multi protocol dataFpga implementation of multi protocol data
Fpga implementation of multi protocol dataeSAT Publishing House
 
Monitoring temperature rumah dengan display lcd dan recording
Monitoring temperature rumah dengan display lcd dan recordingMonitoring temperature rumah dengan display lcd dan recording
Monitoring temperature rumah dengan display lcd dan recordingYuda Wardiana
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolI2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolAnkur Soni
 
Monitoring temperature ruangan dengan display lcd
Monitoring temperature ruangan dengan display lcdMonitoring temperature ruangan dengan display lcd
Monitoring temperature ruangan dengan display lcdmukhammadimam
 
Monitoring Temperature Room With Display LCD and Data Recording
Monitoring Temperature Room With Display LCD and Data RecordingMonitoring Temperature Room With Display LCD and Data Recording
Monitoring Temperature Room With Display LCD and Data RecordingMR Selamet
 

Similar to I2 c communication between nodemcu and aeduino with dht11 (1) (20)

An Implementation of I2C Slave Interface using Verilog HDL
An Implementation of I2C Slave Interface using Verilog HDLAn Implementation of I2C Slave Interface using Verilog HDL
An Implementation of I2C Slave Interface using Verilog HDL
 
I2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoI2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduino
 
Internet of things laboratory
Internet of things laboratoryInternet of things laboratory
Internet of things laboratory
 
Pin out lpc2129
Pin out lpc2129Pin out lpc2129
Pin out lpc2129
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATION
 
An hemmanur
An hemmanurAn hemmanur
An hemmanur
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver development
 
communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systems
 
COM_BASIC.pptx
COM_BASIC.pptxCOM_BASIC.pptx
COM_BASIC.pptx
 
project 3 full report
project 3 full reportproject 3 full report
project 3 full report
 
Please in your own words describe SPI, I2C, and UART with the follow.pdf
Please in your own words describe SPI, I2C, and UART with the follow.pdfPlease in your own words describe SPI, I2C, and UART with the follow.pdf
Please in your own words describe SPI, I2C, and UART with the follow.pdf
 
INT4073 L07(Sensors and AcutTORS).pdf
INT4073 L07(Sensors and AcutTORS).pdfINT4073 L07(Sensors and AcutTORS).pdf
INT4073 L07(Sensors and AcutTORS).pdf
 
Implementation of I2C Master Bus Protocol on FPGA
Implementation of I2C Master Bus Protocol on FPGAImplementation of I2C Master Bus Protocol on FPGA
Implementation of I2C Master Bus Protocol on FPGA
 
Fpga implementation of multi protocol data
Fpga implementation of multi protocol dataFpga implementation of multi protocol data
Fpga implementation of multi protocol data
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
Monitoring temperature rumah dengan display lcd dan recording
Monitoring temperature rumah dengan display lcd dan recordingMonitoring temperature rumah dengan display lcd dan recording
Monitoring temperature rumah dengan display lcd dan recording
 
The I2C Interface
The I2C InterfaceThe I2C Interface
The I2C Interface
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolI2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication Protocol
 
Monitoring temperature ruangan dengan display lcd
Monitoring temperature ruangan dengan display lcdMonitoring temperature ruangan dengan display lcd
Monitoring temperature ruangan dengan display lcd
 
Monitoring Temperature Room With Display LCD and Data Recording
Monitoring Temperature Room With Display LCD and Data RecordingMonitoring Temperature Room With Display LCD and Data Recording
Monitoring Temperature Room With Display LCD and Data Recording
 

Recently uploaded

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

I2 c communication between nodemcu and aeduino with dht11 (1)

  • 1. I2C COMMUNICATION BETWEEN NODEMCU AND ARDUINOWITH DHT11 KUNTALA DAS 7/20/2020 @KUNTALADAS
  • 2. NodeMCU I2C with Arduino IDE  Introduction  I2C (Inter-Integrated Circuit) is serial bus interface connection protocol. It is also called as TWI (two wire interface) since it uses only two wires for communication. Those two wires are SDA (serial data) and SCL (serial clock).  I2C is acknowledgment based communication protocol i.e. transmitter checks for an acknowledgment from the receiver after transmitting data to know whether data is received by receiver successfully.  I2Cworks in two modes namely,  Master mode  Slave mode  SDA (serial data) wire is used for data exchange in between master and slave device. SCL (serial clock) is used for the synchronous clock in between master and slave device.  Master device initiates communication with a slave device. Master device requires slave device address to initiate conversation with a slave device. Slave device responds to master device when it is addressed by a master device.  NodeMCU has I2C functionality support on its GPIO pins. Due to internal functionality on ESP-12E, we cannot use all its GPIOs for I2C functionality. So, do tests before using any GPIO for I2C applications. 7/20/2020 @KUNTALADAS
  • 3. NodeMCU I2C with Arduino IDE  Here, we are using  Master Device: NodeMCU  Slave Device: Arduino Uno  Slave Device Address: 8  Interfacing diagram is shown in below figure 7/20/2020 @KUNTALADAS
  • 7. CONNECTION BETWEEN NODE MCU AND ARDUINO  Master Device: NodeMCU  Slave Device: Arduino Uno  Slave Device Address: 8 7/20/2020 @KUNTALADAS
  • 8. I2C Communications (Wire)  This is an I2C communications library that facilitates two- wire class communications with I2C/TWI devices (also called "Wire Library"). The pull-up to communication lines are needed. With a total of 8 serial channels available. You cannot use slave device. The followings describe channels corresponding to pins and can confirmed using the pin map. To use, specify #include <wire.h>.  Wire: A5(SCL), A4(SDA) Wire1: 0(SCL), 1(SDA) Wire2: 7(SCL), 6(SDA) Wire3: 26(SCL), 24(SDA) Wire4: 5(SCL), 3(SDA) Wire5: 8(SCL), 9(SDA) Wire6: 11(SCL), 12(SDA) Wire7: 60(SCL), 58(SDA) 7/20/2020 @KUNTALADAS
  • 9. I2C Communications (Wire)  I2C functions for Arduino  Wire.write (data)  It is used to write (transmit) data to the master or slave device.  Parameter  data it can be single byte value, string, array of data.  Returns  No. of bytes written.  e.g. Wire.write(7); //send data byte  Wire.write(“i2c”); //send string to slave device  Wire.write(a, 6); //here a is an array  Wire.available()  This function is used by a master or slave to check the requested data is available or not. It returns the no. of bytes available.  Wire.read()  It is used to read the requested data by master from slave or read the data transmitted from a master to a slave. 7/20/2020 @KUNTALADAS
  • 10. I2C Communications (Wire)  Functions for Arduino I2C Master  Note: Every I2C slave device has unique address. While communicating using I2C protocol, this slave address needs to be used by Master.  Arduino has Wire Library which allows us to communicate with I2C devices.  Wire.begin ()  It initiates the Wire library and joins the bus as a master.  Wire.beginTransmission (slave address)  This function begins a transmission with the I2C slave device having specified slave address.  slave address 7-bit address of device with which we want to communicate.  e.g. Wire.beginTransmission (50) //begin transmission with slave having address 50  Wire. requestFrom(address, no of byte) OR  Wire. requestFrom(address, no of byte, stop)  This function is used by master to request or receive data from slave device. The requested data can be read by using Wire.read(). 7/20/2020 @KUNTALADAS
  • 11. MY CONNECTIONWITH DHT11 NODEMCU AND ARDUINO UNO 7/20/2020 @KUNTALADAS
  • 12. MY CONNECTIONWITH DHT11 NODEMCU AND ARDUINO UNO 7/20/2020 @KUNTALADAS