

Due to the advantages like ultra low power consumption, wide viewing angle, great effect under sunlight, it is an ideal choice for applications such as shelf label, industrial instrument, and so on.
RASPBERRY PI 2 SPI ARDUINO CODE
I invite you to read the use of capacitive sensors on the ESP32 with the Arduino code for more details.Overview This is an E-Ink display HAT for Raspberry Pi, 7.5inch, 640x384 resolution, with embedded controller, communicating via SPI interface. They can also be used to wake it up when the ESP32 is in DeepSleep mode (a power-saving mode). They are the famous TOUCH pins that can be found on some ESP32 pinouts. The ESP32 has ten capacitive sensors (9 if the GPIO0 pin is unavailable). I suggest you check the usage of PWM on ESP32 with Arduino code to use it in your projects. The use of PWM differs from Arduino’s, and you can configure more parameters. All the pins configured as output can be used to output a PWM signal. The ESP32 has 16 channels that can be used to generate PWM signals: you can have up to 16 different PWM outputs. This simple code allows you to use the UART2 bus:Īs for the I2C, it is possible to manually choose the pins you want to use for the SPI by specifying the pins during the initialization of the SPI bus.begin(CLK_PIN, MISO_PIN, MOSI_PIN, SS_PIN) PWM on ESP32 By default, the UART2 bus is on pins GPIO16(RX2) and GPIO17(TX2), but you can change them (useful with a Wrover module) during setup. To use the UART2, simply add Serial2.begin() in the function setup() and to use the``Serial2.println()`` to send messages. It generally displays messages in the console with Serial.println(). It is also the one used to flash the ESP32 board when uploading a new program.
RASPBERRY PI 2 SPI ARDUINO SERIAL
It is used to communicate with the computer through the serial monitor. The UART0 is by default on pins GPIO1(TX0) and GPIO3(RX0) of the ESP32. We can use them to communicate with a sensor, an Arduino, a Raspberry Pi, a computer … On the ESP32, 3 UART buses are available: UART0, UART1 and UART2. The UART is the serial protocol that allows easy data exchange between 2 devices.

It remains a good practice to use the pins by default to keep good compatibility with external libraries as long as this does not limit the connection of your wires. ESP32 Pinouts available on the Internet show the default association (if you do not specify the pins used). Only the ADC and the capacitive sensors are assigned to fixed pins. With the ESP32, you can choose the ones you want. For example, on the Arduino Uno, you could only have SPI on pins 10, 11, 12, and 13. The SPI, I2C, UART, PWM, and DAC are no longer associated with specific pins. The pins of the ESP32 are much more modular than those of the Arduino: You can “ attach “ a UART, I2C, SPI, and PWM peripheral on the pins you want. So, in reality, there are fewer possible interfaces for each device. The ESP32 already uses some peripherals in its essential operation. They are much more numerous than on a classic Arduino Uno board. To interact with the modules, sensors or electronic circuits, the ESP32, like any microcontroller, has a multitude of peripherals.

You can use them, but you must be careful when setting a logic state (3.3V or 0V) with an external pull-up or pull-down resistor. The strapping pins are the GPIO0, GPIO2, GPIO12 (MTDI) and GPIO15 (MTDO). Depending on the voltage available on these pins, the ESP32 will start either in BOOT mode or in FLASH mode. They are used to put the ESP32 in BOOT mode (to run the program written in the flash memory) or in FLASH mode (to upload the program to the flash memory). Some pins have a unique function when starting the ESP32. They also do not have internal pull-up and pull-down resistors ( pinMode(36, INPUT_PULLUP) or pinMode(36, INPUT_PULLDOWN) cannot be used). Pins GPIO36 (VP), GPIO39 (VN), GPIO34, and GPIO35 can only be used as input. Fortunately, there are other UART interfaces available. They can be useful for programming the board without a USB but with an external programmer instead. If you use them, you will not be able to upload programs to the board or use the serial monitor via the USB port. The GPIO1 (TX0) and GPIO3 (RX0) pins are used to communicate with the computer in UART via USB. For this reason, these pins are not available on uPesy ESP32 boards.
