It communicates using a serial line. Just connect to it with the serial line from the Arduino or SoftwareSerial if your serial line is already in use for something else.
It's always better to just read the datasheet and specs for a device than to try to "figure out" how to communicate with it.
Then how can i connect the pin if it is serial write mode. Is it possible to read from the sensor using Serialread too will the sensor detect signals by using serialwrite
does this code transmit 0x11, 0x01, 0x01, 0xED in this order to the sensor?
Sort of. It outputs the byte's 1' and 0's with the lsb first.
I doubt you will have much success trying to bit bang serial output on pin 4. You do not have start and stop bits, and are not controlling the baud rate. There are possible endian issues between the sensor and Arduino, and don't know if you have your bit output in the correct order for the sensor.
You should be using a hardware serial port or software serial. You might want to us an Arduino with multiple hardware serial ports