In this paper we show the design and implementation of a novel localization scheme, called Rotatable Antenna Localization (RAL), for a wireless sensor network (WSN) with beacon nodes with directional antennas which rotate regularly. A beacon node periodically sends beacon signals containing its position and antenna orientations. By observing the variation of the received signal strength indication (RSSI) values of the beacon signals, a sensor node can estimate the orientation relative to the beacon node. With the estimated orientations and exact positions of two distinct beacon nodes, a sensor can calculate its own location. Four methods are proposed and implemented for the sensor node to estimate its orientations. Among them, we find that the strongest-signal (SS) method has the most accurate orientation estimation. With SS method, we implement RAL scheme and apply it to a WSN in a 10- by 10-meter indoor environment with two beacon nodes at two ends of a side. Our experiment demonstrates that the average position estimation error of RAL is 76 centimeters. We further propose two methods, namely grid- and vector-based approximation methods, to improve RAL by installing more than two beacon nodes. We show by simulation that the improvements can reduce about 10% of the position error.