Can you have both a bluetooth module and a wifi module on the same arduino?

Can you have both a Bluetooth module and a WiFi module on the same arduino? I ask this beaus of the fact that you connect the Transmit and receive pins on the arduino, to the receive and transmit pins on both the Bluetooth and WiFi device. So. Is it possible to do something like this. Also. Is there any kind of arduino made specifically for this, and as a last thing: Is it possible to use other pins than the transmit and receive pins on the arduino to preform the same function?

You can use SoftwareSerial library and use any Digital pins as RX/TX, that way you can establish serial communication with multiple devices.

I guess Mega has more than one hardware serial ports, in that case you can use and no need to use SoftwareSerial.

nosknut:
Can you have both a Bluetooth module and a WiFi module on the same arduino? I ask this beaus of the fact that you connect the Transmit and receive pins on the arduino, to the receive and transmit pins on both the Bluetooth and WiFi device.

I don’t think that is a fact at all. I believe it is typical for WiFi shields to communicate over the SPI bus, leaving the Rx/Tx free for bluetooth. You also have the option of using software serial, or a Mega, which has four hardware serial ports. I think the ESP8266 module might use serial.

I connected ESP and HC-05 bluetooth module to aduino to Digital pins and using Software Serial to communicate.