esp12 with arduino mega

I have been trying to connect an esp 12 breakout board with my arduino mega. I couldn’t get the right connections.Can someone please help ???

Connect Vcc to the output of a 3.3V voltage regulator. Connect all grounds together.
Pull up CH_PD, RST and GPIO0 to 3.3V using 10k resistors. Pull down GPIO15 to ground using a 10k resistor.
Connect the ESP's TXD to RX of Serial1 on the Mega. Connect the Mega's TX pin to a 5V to 3.3V level shifter (this could be a simple voltage divider with a ratio of ⅔), and the output of the level shifter to the ESP's RXD.

You might be interested in my Beginner's Guide to the ESP8266.