Download Print this page

DFRobot FireBeetle ESP32-E Manual page 45

Advertisement

Description: Re-enables interrupts (after they've been disabled by noInterrupts(). Interrupts allow certain important tasks to happen in the
background and are enabled by default. Some functions will not work while interrupts are disabled, and incoming communication may be
ignored. Interrupts can slightly disrupt the timing of code, however, and may be disabled for particularly critical sections of code.。
noInterrupts()
Description: Disables interrupts (you can re-enable them with interrupts()). Interrupts allow certain important tasks to happen in the
background and are enabled by default. Some functions will not work while interrupts are disabled, and incoming communication may be
ignored. Interrupts can slightly disrupt the timing of code, however, and may be disabled for particularly critical sections of code.
8.5 I2C
IIC Master/Slave Pin
Different from the one-to-one communication mode of serial port, bus communication is usually divided into master and slave. During
communication, the master is responsible for starting and terminating data transmission, and also outputs clock signal; the slave is addressed
by the host and responds to the communication request of the host. The communication rate is controlled by the host, and the master outputs
clock signal for all slaves on the bus through SCL pin. At the same time, I2C is a half duplex communication mode, that is, the devices on the bus
transmit communication data through SDA pins, and the sending and receiving of data are controlled by the host computer. Esp32 has two I2C
controllers (also known as ports) that handle communication on both I2C buses. Each I2C controller can run as a master or slave. Pin 21 is
default to SDA, pin 22 to SCL.
begin(address)
Description: Initiate the IIC and join the I2C bus as a master or slave.
Parameter:
read()
Description: In the host, when the requestfrom() function is used to send the data request signal, the read() function is needed to obtain
the data; in the slave machine, the function is used to read the data sent by the host.
Parameter:
available()

Advertisement

loading
Need help?

Need help?

Do you have a question about the FireBeetle ESP32-E and is the answer not in the manual?

Questions and answers

Related Products for DFRobot FireBeetle ESP32-E

This manual is also suitable for:

Dfr0654