Connecting Xbee S2C to ESP8266-01 module.

I want to be able to connect the xbee S2C TX and Rx pin to Esp’s RX and TX pin respectively. I am very new to this and I want to know how to do the program between them and how to let ESP8266 know that there is a new received value coming from Xbee? Do I use interrupts?

There is no programming on the XBee. Think of it as a serial cable running at a given baud rate (default 9600).

The XBee is a 3V CMOS level device. If the ESP is also at 3V, then it should be able to connect Tx to Rx and Rx to Tx.

In your code for your ESP, just use the XBee as a cable.

Ok great! But the last question would be, how can Esp8266 know that for instance a new value has been received by its rx pin? Do I aimply use use serial. read? Or what exactly?

That is not something that Digi can answer but that is something you can ask the manufacture of the ESP.

Ok, thank you so much!