๐Ÿ“ฃ๐Ÿ“ช ๐Ÿšš Adafruit will not be shipping USPS orders Monday January 20, 2020 ๐Ÿ—“. Expedited USPS orders placed after 11am ET ๐Ÿ•š Friday January 17 will go out Tuesday January 21 ๐Ÿ“ฃ๐Ÿ“ช๐Ÿšš
0

ESP32 interrupt
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ESP32 interrupt

by Workaholic on Fri Jul 05, 2019 3:17 am

Hey guys. I want to know if we can implement interrupt in esp32 using arduino ide, Otherwise, what is a good way to handle serial data.

Regards,

Workaholic
 
Posts: 18
Joined: Thu Mar 28, 2019 6:23 am

Re: ESP32 interrupt

by adafruit_support_mike on Sun Jul 07, 2019 2:16 am

If you want to use Serial data, use one of the hardware Serial ports.

One port is dedicated to talking to the USB cable, but a second one is connected to the TX/RX pins at the side of the board. That interface is identified as Serial1 in code, and is free to connect to anything.

There's also a third, uncommitted Serial interface that you can define if you want to. The code for assigning it to a set of pins looks like this:

Code: Select all | TOGGLE FULL SIZE
HardwareSerial Serial2( 2 );

#define SERIAL2_RX 12
#define SERIAL2_TX 13

void setup() {
  Serial2.begin( 9600, SERIAL_8N1, SERIAL2_RX, SERIAL2_TX );
}

adafruit_support_mike
 
Posts: 60177
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 interrupt

by Workaholic on Mon Jul 08, 2019 2:50 am

Thanks.
I will try this.

Workaholic
 
Posts: 18
Joined: Thu Mar 28, 2019 6:23 am

Please be positive and constructive with your questions and comments.